Question: I need to format a multiplication table in C++ to look like the one below (for 4x4 table) But I can't get the right formating

I need to format a multiplication table in C++ to look like the one below (for 4x4 table)

I need to format a multiplication table in C++ to look like

But I can't get the right formating with the program I wrote. What I have is

#include

#include

using namespace std;

int main()

{

char choice;

int tableSize, row, coll;

do

{

cout

cin >> choice;

if (choice == 'a')

{

do

{

cout

cin >> tableSize;

if (tableSize 10)

{

cout

}

} while(tableSize 10)

cout

for(coll = 1; coll

{

cout

for(row = 1; row

{

cout

for(coll = 1; coll

{

cout

}

}

}

}

else if (choice != 'q')

{

cout

}

else

{

return 0;

}

} while(choice != 'q');

return 0;

}

Can someone please say what I need to change or add in order to get the right format. And the output I get is

the one below (for 4x4 table) But I can't get the right

MULTIPLICATION TABLE 4' s 1 I 1 I 2 l 3 I 4 I 2 l 2 l 6 l 8 I 4 I 3 I 3 I 6 l 9 12 I 8 l 12 l 16 4 I 4

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!