参考代码:
#include<stdio.h>
int main()
{
int n,sum,temp;
while( (~scanf("%d",&n)) && n){
sum = 0;
while(n--){
scanf("%d",&temp);
sum += temp;
}
printf("%d\n",sum);
}
return 0;
}
0.0分
0 人评分
【出圈】 (C语言代码)浏览:796 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:561 |
打水问题 (C语言代码)浏览:1072 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:543 |
2003年秋浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:594 |
三角形 (C语言代码)浏览:915 |
P1000 (C语言代码)浏览:877 |
数对 (C语言代码)浏览:703 |
蚂蚁感冒 (C语言代码)浏览:1335 |
1024题解浏览:811 |