Primes whose sum of digits is 25: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: used faster versions of SUMDIGS and GENP.)
m (→‎{{header|REXX}}: added wording to the REXX section header.)
Line 276: Line 276:


=={{header|REXX}}==
=={{header|REXX}}==
This REXX version allows the following to be specified on the command line:
:*   the high number   ('''HI''')
:*   the number of columns shown per line   ('''COLS''')
;*   the target sum   ('''TARGET''')
<lang rexx>/*REXX pgm finds and displays primes less than HI whose decimal digits sum to TARGET.*/
<lang rexx>/*REXX pgm finds and displays primes less than HI whose decimal digits sum to TARGET.*/
parse arg hi cols target . /*obtain optional argument from the CL.*/
parse arg hi cols target . /*obtain optional argument from the CL.*/