Filter: Difference between revisions
m
→{{header|REXX}}: last try :-(
Walterpachl (talk | contribs) m (→{{header|REXX}}: final correction (sigh)) |
Walterpachl (talk | contribs) m (→{{header|REXX}}: last try :-() |
||
Line 3,314:
Do k=1 For m /* display all the NEW numbers. */
Say right('new.'k,20) '=' right(new.k,9)
End
{{out|output|text= when using the input of: <tt> , 12345 </tt>}}
The '''
<pre>
new.1 = 17520
Line 3,344:
===Using a control array===
This version uses a control array (even.*)
<syntaxhighlight lang="rexx"
/*REXX program uses a control array to tell which elements ars even. */
Parse Arg n seed . /* obtain optional arguments from CL*/
Line 3,361:
If even.k Then /* that are even */
Say right('x.'k,20) '=' right(x.k,9)
End</syntaxhighlight>
{{out|output|text= when using the input of: <tt> 20 12345 </tt>}}
<pre>
|