Jump to content

Input/Output for pairs of numbers: Difference between revisions

(Applesoft BASIC)
(insert →‎Pascal)
Line 443:
10
</pre>
 
=={{header|Free Pascal}}==
''See [[#Pascal|Pascal]]''
 
=={{header|Go}}==
Line 695 ⟶ 698:
}</lang>
Of course for such a simple task this has very little advantage over C, but it does demonstrate the general principle.
 
=={{header|Pascal}}==
<lang pascal>program inputOutputForPairsOfNumbers(input, output);
var
lines: integer;
x: integer;
y: integer;
begin
readLn(lines);
for lines := 1 to lines do
begin
readLn(x, y);
writeLn(x + y)
end
end.</lang>
{{out}}
3
30
2
102
10
 
=={{header|Perl}}==
149

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.