Server IP : 172.16.15.8 / Your IP : 3.145.72.44 Web Server : Apache System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.2.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0705) : /home/lmking1/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
//--------------------------------------------------------------------------- // CS 112 Fall 2008 // Program Assignment 4 // // Written by: L'Tia King // 29 October 2008 //--------------------------------------------------------------------------- #include <iostream> #include <iomanip> #include <iostream> using namespace std; int main () { int i, j, N; cout << "Enter a desired table size (2-20): "; cin >> N; while (N < 2 || N > 20) { cout << "\n!Table size must be in range 2 - 20!"; cout << "\n\nPlease re-enter table size:"; cin >> N; } cout << endl << "~~" << N << "*" << N; cout << " Multiplication Table~~\n"; cout << "\n |"; for(i = 1; i <= N; i++) cout << setw(5) << i; cout << "\n--|"; for(i = 1; i <= N; i++) cout << "-----"; for(i = 1; i <= N; i++) { cout << endl << setw(2) << i << "|"; for (j = 1; j <= N; j++) cout << setw(5) << i * j ; } cout << "\n\n"; return 0; }