Anonymous user
Numbers with equal rises and falls: Difference between revisions
m
→{{header|REXX}}: added a comment to the REXX section header.
m (→{{header|REXX}}: added commaization to output numbers.) |
m (→{{header|REXX}}: added a comment to the REXX section header.) |
||
Line 612:
=={{header|REXX}}==
To do the heavy lifting, this REXX program constructs a table of every two-digit sequence which indicates a
<br>'''rise''' (+1), '''fall''' (-1), or '''neither''' (0).
<lang rexx>/*REXX pgm finds and displays N numbers that have an equal number of rises and falls,*/
parse arg n . /*obtain optional argument from the CL.*/
|