// Homework #4 // Problem 2.15 // What does the following program print? #include main() { int y, x=1, total=0; while( x <= 10 ) { y = x * x; cout << y << endl; total += y; ++x; } cout << "Total is " << total << endl; return 0; } // Solution: // 1 // 4 // 9 // 16 // 25 // 36 // 49 // 64 // 81 // 100 // Total is 385