Numbers with prime digits whose sum is 13: Difference between revisions

m
→‎{{header|REXX}}: changed some comments.
m (→‎{{header|REXX}}: changed the wording of the output text.)
m (→‎{{header|REXX}}: changed some comments.)
Line 180:
 
=={{header|REXX}}==
<lang rexx>/*REXX program pgm finds and displays all decimal numbers whose digits are prime and sum to 13. */
LO= 337; HI= 322222 /*define the low and high range for #s.*/
pDigs= 2357; #= 0 /*define the prime digits; number found #s count.*/
$= /*variable to hold the list of #s found*/
do j=LO for HI-LO+1 /*search for numbers in this range. */
Line 192:
end /*k*/
if sum\==13 then iterate /*Sum not equal to 13? Then skip this #*/
#= # + 1; $= $ j /*bump # count; ofappend numbers# foundto sothe far$ list. */
$= $ j /*append the number to the output list.*/
end /*j*/
 
say strip($); say /*display the output list to the term. */
say # ' decimal numbers found whose digits are prime and the decimal digits sum to 13'</lang>
{{out|output|text=&nbsp; when using the internal default inputs:}}
<pre>