标签:bsp -o scan clu 数字 amp practice print char
#include<stdio.h>
int main()
{
int m,n,i,sum;
scanf("%d",&m);
for(i=1;i<=m;i++)
{
sum=0;
while(1)
{
scanf("%d",&n);
sum=sum+n;
if(getchar()==‘\n‘)break;
}
printf("%d\n",sum);}
return 0;
}
>ch -u "A+B for Input-Output Practice 3.ch"
2
4 1 2 3 4
14
5 1 2 3 5
16
>Exit code: 0
标签:bsp -o scan clu 数字 amp practice print char
原文地址:http://www.cnblogs.com/ostrich-sugar/p/7799397.html