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