#include <stdio.h> int main(){ int n,s; while(scanf("%d",&n)!=EOF){ s=0; for(n;n>0;n-=1){ s=s+n; } printf("%d",s); } return 0; }
Double click to view unformatted code.