Narcissistic decimal number: Difference between revisions

Content added Content deleted
(Promote to full task from draft.)
m (→‎{{header|REXX}}: adjust numeric digits to handle the largest narcissistic number.)
Line 131: Line 131:
=={{header|REXX}}==
=={{header|REXX}}==
<lang rexx>/*REXX program to generate and display a number of narcissistic numbers.*/
<lang rexx>/*REXX program to generate and display a number of narcissistic numbers.*/
numeric digits 20 /*just in case more are wanted. */
numeric digits 39 /*be able to handle the largest #*/
parse arg N .; if N=='' then N=25 /*get number of narcissistic #'s.*/
parse arg N .; if N=='' then N=25 /*get number of narcissistic #'s.*/
N=min(N,89) /*there are 89 narcissistic #s.*/
#=0 /*number of narcissistic # so far*/
#=0 /*number of narcissistic # so far*/
do j=1 until #==N; L=length(j) /*get the length of the J number.*/
do j=1 until #==N; L=length(j) /*get the length of the J number.*/