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