Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a program called MultiplicationTableYourLastName . Using nested loops, create a multiplication table from 1 to 15. Your output should look like this: Look at
Create a program called MultiplicationTableYourLastName. Using nested loops, create a multiplication table from 1 to 15. Your output should look like this:
Look at the PowerTable.java example in section 4.8 to see how to format a printf statement so that everything lines up night. Here is the printf statement that I used in the code above: System.out.printf("%4d", row*col);
Essentially, you are reserving four spaces to hold the results of row*col. This will make your multiplication table look like the example.
4 14 369 123 4 5 2 4 6 8 10 6 12 7 14 8 16 9 18 10 20 11 22 12 24 13 26 14 28 15 30 4 5 6 7 8 9 10 11 12 13 14 14 15 8 10 12 16 18 20 22 24 26 28 30 12 15 18 21 24 27 27 30 33 36 39 42 45 12 16 16 20 24 28 32 36 40 44 48 52 56 60 15 20 25 30 35 40 45 50 55 60 65 70 75 18 24 30 36 42 48 54 60 66 72 78 84 90 21 28 35 42 49 56 63 70 77 84 91 98 105 24 32 40 48 56 64 72 80 88 96 104 112 120 27 36 45 54 63 72 81 90 99 108 117 126 135 30 40 50 60 70 80 90 100 110 120 130 140 150 33 44 55 66 77 88 99 110 121 132 143 154 165 36 48 60 72 84 96 108 120 132 144 156 168 180 39 52 65 78 91 104 117 130 143 156 169 182 195 42 56 70 84 98 112 126 140 154 168 182 196 210 45 60 75 90 105 120 135 150 165 180 195 210 225
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started