#include #include // this program displays a table of numbers, their squares and cubes // starting from the number 1. The final number in the table is // input by the user int main() { int num, final; cout << "Enter the final number for the table: "; cin >> final; cout << "NUMBER SQUARE CUBE\n"; cout << "------ ------ ----\n"; for (num = 1; num <= final; num++) cout << setw(3) << num << setw(8) << num*num << setw(7) << num*num*num << endl; return 0; }