Question: Ask the user for an integer then ask the user if he/she wants to count up or down. Display a table of numbers where the
Ask the user for an integer then ask the user if he/she wants to count up or down. Display a table of numbers where the first column contains the counter, the second column contains the counter plus 10, and the third column contains the counter plus 100. Make it so each number takes up 5 spaces total.
If counting up, the first column should contain numbers 1 through the user input;
If counting down, the first column should contain numbers -1 through the the negative of the user input;
Do user input validation on the word "up" and "down". Allow for any case.
Enter an ending value
90 ENTER
Count up or down?
downENTER
-1 9 99
-2 8 98
-3 7 97
-4 6 96
-5 5 95
-6 4 94
-7 3 93
-8 2 92
-9 1 91
-10 0 90
-11 -1 89
-12 -2 88
(in java)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
