Question
C++ lab 10: Print the multiplication table from 1-9 similarly to what is shown below, including the legend on the top and sides. Calculate the
C++
lab 10: Print the multiplication table from 1-9 similarly to what is shown below, including the legend on the top and sides. Calculate the values and use nested loops to complete this lab. Your table should line up nicely (remember setw!)
Think about the three types of loops we have learned (while, do-while and for) and choose the most appropriate type for this problem.
lab 12: Modify Lab 10 so that the full contents of the multiplication table is stored into a two-
dimensional array and then printed. Store the size of the array as a named constant
test with at least two different sizes. Make your table range from 0 to the size-1.
ok so I have lab 10 finished I'm just having a hard time modifying it
here is my source code for lab 10:
#include
int main() { int m;
for(int i = 1; i<10; i++) { for(int j = 1; j<10; j++) { if(j==1) cout << i << "|"; m = i*j; cout << setw(5) << m; } cout << endl; } system("PAUSE"); }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started