【杭电】[1092]A+B for Input-Output Practice (IV)

题目描述
输入输出

#include<stdio.h>
int main() {
    int i,j,x,sum;
    while(scanf("\n%d",&j),j!=0) {
        sum=0;
        for(i=0; i<j; i++) {
            scanf("%d",&x);
            sum=sum+x;
        }
        printf("%d\n",sum);
    }
    return 0;
}
posted @ 2015-12-20 11:02  BoilTask  阅读(2)  评论(0编辑  收藏  举报