// Example 7.3. Calculate the squares of the integers 1 through 10 #include #include using namespace std; int main() { const int MAX_INDEX = 10; cout << "Table of Squares of Integers" << endl; cout << " Integer Integer Squared" << endl; cout << " ------- ---------------" << endl << endl; for (int num = 1; num <= MAX_INDEX; ++num) cout << setw(6) << num << setw(15) << num * num << endl; return 0; }