Positive decimal integers with the digit 1 occurring exactly twice: Difference between revisions
Content added Content deleted
m (→{{header|RPL}}: optimized code) |
(→{{header|Euler}}: Sybntax highlight with Mediawiki markup) |
||
Line 173: | Line 173: | ||
=={{header|Euler}}== |
=={{header|Euler}}== |
||
As with the Arturo, F# etc. samples, generates the sequence but doesn't sort it into order. |
As with the Arturo, F# etc. samples, generates the sequence but doesn't sort it into order. |
||
'''begin''' '''new''' dPos; '''new''' non1digits; '''label''' digitLoop; |
|||
<syntaxhighlight lang="euler"> |
|||
non1digits <- ( 0, 2, 3, 4, 5, 6, 7, 8, 9 ); |
|||
dPos <- 0; |
|||
⚫ | |||
'''new''' d; |
|||
⚫ | |||
d <- non1digits[ dPos ]; |
|||
d |
'''out''' [ d * 100 ] + 11; '''out''' [ d * 10 ] + 101; '''out''' 110 + d; |
||
'''goto''' digitLoop |
|||
'''end''' '''else''' 0 |
|||
⚫ | |||
end else 0 |
|||
⚫ | |||
</syntaxhighlight> |
|||
{{out}} |
{{out}} |
||
<pre> |
<pre> |