Input/Output for pairs of numbers: Difference between revisions
Content deleted Content added
→{{header|Perl 6}}: explanation |
→{{header|REXX}}: added the REXX language. -- ~~~~ |
||
Line 124:
10
>>> </lang>
=={{header|REXX}}==
<lang rexx>/*REXX pgm reads a number, then reads that # of pairs, writes their sum.*/
do linein() /*read the number of pairs to add*/
x=linein() /*read a line (record) from input*/
say word(x,1) + word(x,2) /*write the sum of a pair of nums*/
end
/*stick a fork in it, we're done.*/</lang>
=={{header|Ruby}}==
|