Advertisement
rafikamal

Find the sum of squares

Jan 8th, 2013
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.17 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     int i;
  6.     int sum = 0;
  7.  
  8.     for(i = 1; i <= 100; i++)
  9.         sum = sum + i * i;
  10.  
  11.     printf("%d\n", sum);
  12.  
  13.     return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement