/* program 4 * find the sum of the first 30 squares */ #include using namespace std; int main() { int i,sum; // variables sum = 0; // initialize sum /* recursive addition of squares */ for (i = 1; i <= 30; i++) sum = sum + (i * i); cout << sum <<" is the sum of the first 30 squares." << endl; // system("pause"); //un-comment when using DevC++ return 0; }