#include<stdio.h> int main() { int n,i,sum; while(scanf("%d",&n)!=EOF){ sum=0; for(i=1;i<=n;i++) sum+=i; printf("%d\n",sum); } return 0; }
#include<stdio.h> int main() { int n,i,sum; while(scanf("%d",&n)!=EOF){ sum=0; for(i=1;i<=n;i++) sum+=i; printf("%d\n",sum); } return 0; }
转载于:https://www.cnblogs.com/Estwind/p/9896596.html