Write a C program to find the sum of the squares of the integers f rom 1 to 30. Print the sum of the squares.
![](http://i1271.photobucket.com/albums/jj626/samath89/wwww_zpsa3cfcfb2.jpg)
Solution:
#include <stdio.h>
using namespace std;
int main(int argc, char *argv[])
{
int i;
int result = 0;
for (i = 1; i <= 30; i++)
{
result = result + (i * i);
}
printf ("%d is the sum of the first 30 squares.\n" ,result);
return 0;
}