Output For each test case you should output the sum of N integers in one line, and with one line of output for each line in input.
Sample Input
4 1 2 3 4 5 1 2 3 4 5Sample Output
10 15
这虽然是道水题,但它却是我自己做出来的
#include<stdio.h>
int main()
{
int i;
while(scanf("%d",&i)!=EOF)
{
int sum=0;
for(int n=0;n<i;n++)
{
int a[100];
scanf("%d",&a[n]);
sum+=a[n];
}
printf("%d\n",sum);
}
return 0;
}