Positive decimal integers with the digit 1 occurring exactly twice: Difference between revisions
Positive decimal integers with the digit 1 occurring exactly twice (view source)
Revision as of 01:58, 27 December 2021
, 2 years agoAdded 11l
(add FreeBASIC) |
Alextretyak (talk | contribs) (Added 11l) |
||
Line 4:
Find positive decimal integers '''n''' in which the digit '''1''' occurs exactly twice, where '''n < 1,000'''.
<br><br>
=={{header|11l}}==
<lang 11l>L(n) 1000
I String(n).count(‘1’) == 2
print(n, end' ‘ ’)</lang>
{{out}}
<pre>
11 101 110 112 113 114 115 116 117 118 119 121 131 141 151 161 171 181 191 211 311 411 511 611 711 811 911 </pre>
=={{header|Action!}}==
|