Input/Output for pairs of numbers: Difference between revisions

Added Easylang
(added RPL)
(Added Easylang)
 
(One intermediate revision by one other user not shown)
Line 393:
readln.split.to!(int[]).sum.writeln;
}</syntaxhighlight>
 
=={{header|EasyLang}}==
<syntaxhighlight>
n = number input
for i to n
a[] = number strsplit input " "
print a[1] + a[2]
.
input_data
5
1 2
10 20
-3 5
100 2
5 5
</syntaxhighlight>
{{out}}
<pre>
3
30
2
102
10
</pre>
 
 
=={{header|Factor}}==
Line 1,092 ⟶ 1,117:
=={{header|Wren}}==
This assumes that both Stdin and Stdout are connected to a terminal.
<syntaxhighlight lang="ecmascriptwren">import "io" for Stdin
 
var output = Fn.new { |pairs| pairs.each { |p| System.print(p[0] + p[1]) } }
2,046

edits