Question: C++ You are to write a program that will generate a multiplication table like the ones you had when you were first learning your multiplications.

C++

You are to write a program that will generate a multiplication table like the ones you had when you were first learning your multiplications. Your program will be able to generate any size multiplication table based on input. So if the input were 5 then generate a multiplication table from 1 to 5.

1 2 3 4 5 ------------------- 1 1 2 3 4 5 2 2 4 6 8 10 3 . 5 5 10 .. 25

Or if the input was an 8 then generate a table of 8.

1 2 3 4 5 ------------------- 1 1 2 3 4 5 2 2 4 6 8 10 3 . 5 5 10 .. 25

6 6 . 7 8 8 16 . 40

6 7 8 --------------- 1 6 7 8 2 12 14 16 3 . 5 30 35 40

8 48 56 64

Restriction, you can only have 5 columns wide table. Any multiply values bigger than 5 must start a new table, as shown above. Also the last table may not have 5 columns to print. See above the multiply for 8 stops at multiple of 8 and not at 10.

Input and print three multiply tables, one of 5, one of 8 and one of 16. Label each column and each row. You are NOT to use arrays for this program.

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!