Pages
HOME
UVA SOLUTION
BANGLA BOOKS
Tuesday, November 5, 2013
ACM HDU Problem Solution 1001 - Sum Problem
Problem 1001 - Sum Problem
Problem Link
Solution:
#include
int main(){
int n,sum,p;
while(scanf("%d",&n)==1){
sum=0;
for(p=1;p<=n;p++)
sum = sum + p;
printf("%d\n\n",sum);
}
return 0;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment