标签:c style class blog code java
1 #include <stdio.h> 2 int main() 3 { 4 int n,sum=0; 5 while(scanf("%d",&n)){ 6 if(n==0) {return 0;} 7 else{ 8 int i,a; 9 for(i=0;i<n;i++){ 10 scanf("%d",&a); 11 sum+=a; 12 } 13 } 14 printf("%d\n",sum); 15 sum=0; 16 } 17 return 0; 18 }
标签:c style class blog code java
原文地址:http://www.cnblogs.com/Codenewbie2/p/3779054.html