[ create a new paste ] login | about

Link: http://codepad.org/tpPVbcz4    [ raw code | output | fork ]

C, pasted on Nov 28:
1
2
3
4
5
6
7
8
9
10
11
#include <stdio.h>
int main ()
{ int sum=0, N, i, c=0; N=50;
for ( i=0; i<=N; i++)
{  c+=i;  sum+=c;  }
 
printf ("SUMMA=%d", sum);
 

return 0;
} 


Output:
1
SUMMA=22100


Create a new paste based on this one


Comments: