Sums in Loop

Problem #3

Tags: simple loops c-0

Who solved this?

Also available in: German Spanish French Arabic Chinese Romanian Russian Slovak
summing two arrays


If you already learned how to write program with a simple loop from Sum in Loop task, this new exercise will be just a simple modification.

Now we are given several pairs of values and we want to calculate sum for each pair.

Input data will contain the total count of pairs to process in the first line.
The following lines will contain pairs themselves - one pair at each line.
Answer should contain the results separated by spaces.

Example:

data:
3
100 8
15 245
1945 54

answer:
108 260 1999
You need to login to get test data and submit solution.