Input/Output for pairs of numbers: Difference between revisions

m
→‎{{header|REXX}}: changed comments, added whitespace.
No edit summary
m (→‎{{header|REXX}}: changed comments, added whitespace.)
Line 552:
=={{header|REXX}}==
This version isn't limited to summing integers, any form of number that REXX supports can be used.
<lang rexx>/*REXX pgm reads a number (from C.L.the CL), reads that #number of pairs, & writes their sum.*/
/*stick a fork in it, we're /*all doneinput is from the Command Line. */</lang>
 
do linein() /*read the number of pairs to be add*ed*/
y$=linein() /*read a line (a record) from the inputC.L. */
say word(y$, 1) + word(y$, 2) /*writedisplay the sum of a pair of numbers. */
end /*linein() */ /*keep getting pairs of # (the 1st get)*/
/*stick a fork in it, we're all done. */</lang>
 
/*stick a fork in it, we're all done. */</lang>
 
=={{header|Ring}}==