Munchausen numbers: Difference between revisions

Content added Content deleted
(→‎{{header|REXX}}: added versions 2 and 3.)
m (→‎{{header|REXX}}: changed spelling of Munchhausen to Münchhausen.)
Line 665: Line 665:
parse arg z . /*obtain optional argument from the CL.*/
parse arg z . /*obtain optional argument from the CL.*/
if z=='' | z=="," then z=5000 /*Not specified? Then use the default.*/
if z=='' | z=="," then z=5000 /*Not specified? Then use the default.*/
@is='is a Munchhausen number.'; do j=1 for z /* [↓] traipse through all the numbers*/
@is='is a Münchhausen number.'; do j=1 for z /* [↓] traipse through all the numbers*/
if isMunch(j) then say right(j, 11) @is
if isMunch(j) then say right(j, 11) @is
end /*j*/
end /*j*/
Line 676: Line 676:
'''output'''
'''output'''
<pre>
<pre>
1 is a Munchhausen number.
1 is a Münchhausen number.
3435 is a Munchhausen number.
3435 is a Münchhausen number.
</pre>
</pre>


Line 686: Line 686:
parse arg z . /*obtain optional argument from the CL.*/
parse arg z . /*obtain optional argument from the CL.*/
if z=='' | z=="," then z=5000 /*Not specified? Then use the default.*/
if z=='' | z=="," then z=5000 /*Not specified? Then use the default.*/
@is='is a Munchhausen number.'; do j=1 for z /* [↓] traipse through all the numbers*/
@is='is a Münchhausen number.'; do j=1 for z /* [↓] traipse through all the numbers*/
if isMunch(j) then say right(j, 11) @is
if isMunch(j) then say right(j, 11) @is
end /*j*/
end /*j*/