Positive decimal integers with the digit 1 occurring exactly twice: Difference between revisions
Content deleted Content added
Drkameleon (talk | contribs) |
→{{header|Euler}}: Replace with generative, non-sorted version inspired by the Arturo, F# etc, samples |
||
Line 172:
=={{header|Euler}}==
As with the Arturo, F# etc. samples, generates the sequence but doesn't sort it into order.
<syntaxhighlight lang="euler">
begin new dPos; new
digitLoop: if [ dPos <- dPos + 1 ] <= length non1digits then begin
out [ d * 100 ] + 11; out [ d * 10 ] + 101; out 110 + d;
v <- v % 10;▼
goto vLoop▼
end $
</syntaxhighlight>
Line 195 ⟶ 190:
NUMBER 101
NUMBER 110
NUMBER 112▼
NUMBER 113▼
NUMBER 114▼
NUMBER 115▼
NUMBER 116▼
NUMBER 117▼
NUMBER 118▼
NUMBER 119▼
NUMBER 121▼
NUMBER 131▼
NUMBER 141▼
NUMBER 151▼
NUMBER 161▼
NUMBER 171▼
NUMBER 211
NUMBER 311
▲ NUMBER 113
NUMBER 411
▲ NUMBER 114
NUMBER 511
▲ NUMBER 115
NUMBER 611
▲ NUMBER 116
NUMBER 711
▲ NUMBER 117
NUMBER 811
▲ NUMBER 118
NUMBER 911
▲ NUMBER 119
</pre>
|