Lab 5 Multiplication table

 

Design and implement an application that prompts the user to enter an integer between 1 and 12 inclusive. Validate the input (make sure the number entered is within this range) and continue prompting if the user enters a value outside this range. After validation, print a multiplication table showing the results of multiplying the integers 1 through the input number as shown in the example below. You must use two for loops to generate the output table.

 

Enter an integer between 1 and 12: -1

Enter an integer between 1 and 12: 14

Enter an integer between 1 and 12: 5

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