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