Smallest multiple: Difference between revisions

add RPL
(add RPL)
Line 929:
done...
</pre>
=={{header|RPL}}==
{{trans|BASIC}}
≪ 2 3 * 5 * 7 * 9 * 11 * 13 * 17 * 19 * → t
≪ t 2 20 '''FOR''' lim
'''IF''' DUP lim MOD '''THEN''' 1 'lim' STO t + '''END NEXT'''
≫ ≫ '<span style="color:blue">TASK</span>' STO
With <code>LCM</code> defined at [[Least common multiple#RPL|Least common multiple]]:
≪ 1 2 20 '''FOR''' n n <span style="color:blue">LCM</span> '''NEXT''' ≫ '<span style="color:blue">TASK</span>' STO
{{out}}
<pre>
1: 232792560
</pre>
 
=={{header|Ruby}}==
<syntaxhighlight lang="ruby">
1,150

edits