taking many inputs in one time

i want taking many inputs in one time and then processing it one by one without using array
eg.to add two number like
alt text
in first go take only input
then print result
** Not using arrays.``

I am modifying the sample input to incorporate the number of test cases in the first line. So, the sample input will look like

2
34 5
45 7

and the sample output will look like

39
52

In that case, the following C/C++ code snippet will do.

int T, t;
int m, n;
scanf("%d", &t);
for (t = 0; t < T; ++t)
{
    scanf("%d%d", &m, &n);
    printf("%d\n", m + n);
}

You can go on reading input, process them and print the output for each test case, one-by-one.

All that matters is that the output generated should be correct and conforms to the specified output format.

{
int a,sum=0;
scanf("%d",&a);
for(;a!=0;)
{
sum=sum+a;
scanf("%d",&a);
}
printf("\n sum is;%d",sum);
}

Hi, the question is not to find the sum of all numbers.

And a tip: Do not print anything else than what the output specification asks for! i.e., " sum is" is not required.