Input/Output for pairs of numbers: Difference between revisions
Content added Content deleted
Alextretyak (talk | contribs) No edit summary |
No edit summary |
||
Line 30: | Line 30: | ||
V (a, b) = input().split(‘ ’).map(Int) |
V (a, b) = input().split(‘ ’).map(Int) |
||
print(do_stuff(a, b))</lang> |
print(do_stuff(a, b))</lang> |
||
=={{header|Ada}}== |
|||
There can be newlines before or between numbers. The pairs may be on separate lines or the same line. |
|||
<lang Ada>with Ada.Text_IO; use Ada.Text_IO; |
|||
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; |
|||
procedure Main is |
|||
count : Integer; |
|||
First : Integer; |
|||
Second : Integer; |
|||
begin |
|||
Get (count); |
|||
for I in 1 .. count loop |
|||
Get (First); |
|||
Get (Second); |
|||
Put (Item => First + Second, Width => 1); |
|||
New_Line; |
|||
end loop; |
|||
end Main;</lang> |
|||
{{output}} |
|||
Output using the example input: |
|||
<pre> |
|||
3 |
|||
30 |
|||
2 |
|||
102 |
|||
10 |
|||
</pre> |
|||
=={{header|ALGOL 68}}== |
=={{header|ALGOL 68}}== |