#include #include #include using namespace std; int main() { cout << "Numbers needed for the multiplication table? "; int n {0}; cin >> n; if (!cin) { cerr << "Sorry, that wasn’t a number.\n"; return EXIT_FAILURE; } if (n <= 0) { cerr << "Sorry, the number must be positive.\n"; return EXIT_FAILURE; } cout << "\n" << "\n" << "\n" << "Multiplication Table\n" << "\n" << "\n" << "\n" << "

Multiplication Table

\n" << "\n"; //Column headings cout << "\n"; cout << "\n"; for (int col {1}; col <= n; ++col) { cout << "\n"; } cout << "\n"; //The rows of the table. for (int row {1}; row <= n; ++row) { cout << "\n"; cout << "\n"; for (int col {1}; col <= n; ++col) { cout << "\n"; } cout << "\n"; } cout << "
×" << col << "
" << row << "" << row * col << "
\n" << "\n" << "\n"; return EXIT_SUCCESS; }