Question: Write a program that prints a multiplication table, like this: 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10
Write a program that prints a multiplication table, like this:
1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 . . . 8 16 24 32 40 48 56 64 72 80 9 18 27 36 45 54 63 72 81 90 10 20 30 40 50 60 70 80 90 100
Hint: You can nicely format your answer by forcing four digits per number:
System.out.print(String.format("%4d", ans)); The code must be in Java we use IntelliJ
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
