Super-d numbers: Difference between revisions

m
→‎{{header|REXX}}: added/changed whitespace and comments.
(→‎{{header|REXX}}: Add Python)
m (→‎{{header|REXX}}: added/changed whitespace and comments.)
Line 372:
if LO=='' | LO=="," then LO= 2 /*low end of D for the super-d nums.*/
if HI=='' | HI=="," then HI= 9 /*high " " " " " " " */
#= 0 /*count of[↓] process D from theLO super-d──► numbers (soHI. far)*/
 
do d=LO for HI-1; #= 0 /*processcount of the super-d D from LO throughnumbers (so HIfar)*/
#= 0 /*count of the super-d numbers (so far)*/
$= /* list " " " " " " */
z= copies(d, d) /*the string that is being searched for*/
do j=2 until #==n /*search for super-d numbers 'til found*/
if pos(z, d * j**d)==0 then iterate /*does product have the required reps? */
#= # + 1; $= $ j /*bump counter; add the number to list*/
end /*j*/
say
say center(' the first ' n " super-"d 'numbers ', digits(), "═")