Sum Problem
Sum Problem
http://acm.hdu.edu.cn/showproblem.php?pid=1001
#include<stdio.h>
int main() {
int a;
while (scanf("%d\n", &a)!=EOF) {
int sum = 0, i = 1;
for (;i <= a;i++) {
sum += i;
}
if (i > a)
printf("%d\n\n", sum);
}
return 0;
}