Question: Function Assignment Help C++ Write a function with the following interface: void multiplyTable(int num) This function should display the multiplication table for values from 1...num.

Function Assignment Help C++

Write a function with the following interface:

void multiplyTable(int num)

This function should display the multiplication table for values from 1...num. For example, if the function is passed 10 when it is called, it should display the following:

1 2 3 4 5 6 7 8 9 10

2 4 6 8 10 12 14 16 18 20

3 6 9 12 15 18 21 24 27 30

4 8 12 16 20 24 28 32 36 40

5 10 15 20 25 30 35 40 45 50

6 12 18 24 30 36 42 48 54 60

7 14 21 28 35 42 49 56 63 70

8 16 24 32 40 48 56 64 72 80

9 18 27 36 45 54 63 72 81 90

10 20 30 40 50 60 70 80 90 100

As another example, if the function is passed 5, it would print the following:

1 2 3 4 5

2 4 6 8 10

3 6 9 12 15

4 8 12 16 20

5 10 15 20 25

Write a main() to test your function. Main should ask the user for an input value (in the range 1..15), then call multiplyTable with that value.

Note:

The maximum parameter value that your function will need to handle is 15.

Make sure that your numbers are aligned properly as illustrated in the examples above.

This is the assgnment can someone program this?

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!