标签:put lines content break highlight contains printf seve int
http://acm.hdu.edu.cn/showproblem.php?pid=2162
#include <bits/stdc++.h>
using namespace std;
int a[1111];
int main() {
int n, cnt = 0;
while(~scanf("%d", &n)) {
getchar();
if(n <= 0) break;
cnt ++;
int sum = 0;
for(int i = 1; i <= n; i ++) {
scanf("%d", &a[i]);
sum += a[i];
}
printf("Sum of #%d is %d\n", cnt, sum);
}
return 0;
}
标签:put lines content break highlight contains printf seve int
原文地址:https://www.cnblogs.com/zlrrrr/p/9420575.html