题目要求:
数列求和
#include<stdio.h>
int main(){
int i; int n; int sum;
while(scanf("%d",&n)!=EOF){ sum=0; for(i=0;i<=n;i++){ sum+=i; }
printf("%d\n\n",sum);
}
return 0;