Inconsummate numbers in base 10: Difference between revisions

added RPL
m (Added language identifier.)
(added RPL)
Line 1,194:
 
One thousandth: 6996</pre>
 
=={{header|RPL}}==
<code>∑DIGITS</code> is defined at [[Sum digits of an integer#RPL|Sum digits of an integer]]
{{trans|BASIC}}
« 999 DUP { } + 0 CON
10 ROT DUP XPON 1 + 9 * * '''FOR''' n
n DUP <span style="color:blue">∑DIGITS</span>
'''IF''' DUP2 MOD NOT '''THEN'''
/ '''IFERR''' 1 PUT '''THEN''' DROP2 '''END'''
'''ELSE''' DROP2 '''END'''
'''NEXT'''
{ } SWAP 10
'''WHILE''' 3 PICK SIZE 50 < '''REPEAT'''
'''IF''' GETI NOT '''THEN''' ROT OVER 1 - + ROT ROT '''END'''
'''END''' DROP2
» '<span style="color:blue">TASK</span>' STO
{{out}}
<pre>
1: { 62 63 65 75 84 95 161 173 195 216 261 266 272 276 326 371 372 377 381 383 386 387 395 411 416 422 426 431 432 438 441 443 461 466 471 476 482 483 486 488 491 492 493 494 497 498 516 521 522 527 }
</pre>
 
=={{header|Wren}}==
1,150

edits