Question: Good evening, can you please help me with this question? 1. Create a new program called Lab14B that will create a multiplication table for an
Good evening,
can you please help me with this question?
1. Create a new program called Lab14B that will create a multiplication table for an input number.
A. Create an integer function named getNumber (with no parameters)
1. . It should ask the user to enter a positive integer between 1 and 10.
2. In the function write a while loop that will keep asking for a number until the user enters one that meets the requirements.
3. Then return the number.
B. Create a void function called printTable that will accept an integer as a parameter and will print out a multiplication table for that number like the example below. You need to use a loop to do this.
(If the input number is 7)
- 7
- 14
- 21
- 28
- 35
- 42
- 49
- 56
- 63
- 70
C. In the main function, call getNumber to get the number for your multiplication table and then call printTable (using the returned number from getNumber as the parameter) to print it.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
