introduce you to the MIPS ISA using MARS. You will create a block diagram by draw.io and pseudocode to help you design the structure of your program. Then you will write a program with a nested loop to print a multiplication table to the screen.
This program will prompt the user twice for integers. The first integer entered must be in the range [1, 82] (smallest valid input: 1, largest valid input: 82). For the second user input, the smallest valid integer is one greater than the previous user input and the largest valid input is 83.
If the user enters an invalid integer, an error message will be printed and the user will be prompted again.
After user input is gathered, a multiplication table will be printed in the format shown below. The multiplication table will have 12 rows (for multipliers 1 through 12), not including the header row that lists the multipliers indicated by user input.
Example Outputs
User inputs 4 and 16
Enter a positive integer in the range [1, 82]: -9
Invalid entry!
Enter a positive integer in the range [1, 82]: 4
Enter a larger positive integer in the range [5, 83]: 4
Invalid entry!
Enter a larger positive integer in the range [5, 83]: 16
----------------------------------------
MULTIPLICATION TABLE
----------------------------------------
4 5 6 7 8 9 10 11 12 13 14 15 16
1 4 5 6 7 8 9 10 11 12 13 14 15 16
2 8 10 12 14 16 18 20 22 24 26 28 30 32
3 12 15 18 21 24 27 30 33 36 39 42 45 48
4 16 20 24 28 32 36 40 44 48 52 56 60 64
5 20 25 30 35 40 45 50 55 60 65 70 75 80
6 24 30 36 42 48 54 60 66 72 78 84 90 96
7 28 35 42 49 56 63 70 77 84 91 98 105 112
8 32 40 48 56 64 72 80 88 96 104 112 120 128
9 36 45 54 63 72 81 90 99 108 117 126 135 144
10 40 50 60 70 80 90 100 110 120 130 140 150 160
11 44 55 66 77 88 99 110 121 132 143 154 165 176
12 48 60 72 84 96 108 120 132 144 156 168 180 192
-- program is finished running --
User inputs 2 and 5
Enter a positive integer in the range [1, 82]: 83
Invalid entry!
Enter a positive integer in the range [1, 82]: 2
Enter a larger positive integer in the range [3, 83]: 5
----------------------------------------
MULTIPLICATION TABLE
----------------------------------------
2 3 4 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
6 12 18 24 30
7 14 21 28 35
8 16 24 32 40
9 18 27 36 45
10 20 30 40 50
11 22 33 44 55
12 24 36 48 60
-- program is finished running --