|
|
back to boardDiscussion of Problem 1068. SumWhy wrong ? #include<stdio.h> #include<math.h> int main() { int N; scanf("%d",&N); int i,ck = 0; for(i = 2; i <= abs(N); i++) ck += i; if(N < 0) printf("-%d\n",ck); else printf("%d\n",ck); return 0; } Re: Why wrong ? Posted by Aman 5 Apr 2017 22:33 |
|
|