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 #include using namespace std;

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!