Anonymous user
Numbers with prime digits whose sum is 13: Difference between revisions
Numbers with prime digits whose sum is 13 (view source)
Revision as of 14:26, 21 October 2020
, 3 years ago→{{header|REXX}}: simplified code.
(Realize in F#) |
m (→{{header|REXX}}: simplified code.) |
||
Line 309:
=={{header|REXX}}==
<lang rexx>/*REXX pgm finds and displays all decimal numbers whose digits are prime and sum to 13. */
LO= 337; HI= 322222; #=
$= /*variable to hold the list of #s found*/
do j=LO for HI-LO+1 /*search for numbers in this range. */
if verify(j,
parse var j a 2 b 3 '' -1 z /*parse: 1st, 2nd, & last decimal digs.*/
sum= a + b + z /*sum: " " " " " " */
|