Question: Java 4. (15pts) Write an application that displays the multiplication table for 1-9, the layout should be aligned nicely (HINT: printf or String.format are very
4. (15pts) Write an application that displays the multiplication table for 1-9, the layout should be aligned nicely (HINT: printf or String.format are very useful for making surea number takes up enough spaces..e. width. right-aligned in this one) You MUST use nested for-loops...i.e. a loop within a loop. Sample Output 1 2 3 45 6 789 20 24 6 8 10 12 14 16 3 0 3 6 9 12 15 18 21 24 41048 12 16 20 24 28 32 51 0 5 10 15 20 25 30 35 40 61 0 6 12 18 24 30 36 4248 71 0 7 14 21 28 35 42 49 56 8I 0 8 16 24 32 40 48 56 64 90 9 18 27 36 45 54 63 72 5. 15pts) Write a program that prompts the user for a umber, then an operation if equals is entered do not ask for more numbers, otherwise ask for a second number Now depending on the operation (+Perform the operation, saving the result ask for another operation to modify the result (again fstop)...keep going untilisentered Sample Output Enter the first nuber: 15 15 Enter an operation: Enter the next number 3 - 18 Enter an operation:/ Enter the next number: 6 Enter an operation: Ente he next nunber: 1 Enter an operation: Enter the next nunber: 10 - 20 Enter an operation: Enter the next nunber 3 23 Enter an operation: The final result is 23
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
