Question: JAVA OOP 7. Write a Java program to show the upside-down number pyramid. The program will prompt the user to enter an integer number as
JAVA OOP

7. Write a Java program to show the upside-down number pyramid. The program will prompt the user to enter an integer number as input. If the user input is 9 or less, display that many lines of the pyramid. If user input is 10 or above, display only 9 lines. Don't hard code the values, use logic. Sample Input 5 Expected Output 1 2 3 4 5 4 3 2 1 1 2 3 4 3 2 1 123 21 121 1 12 1 2 3 4 5 6 7 8 9 8 7 6 5 4 3 2 1 1 2 3 4 5 6 7 8 7 6 5 4 3 2 1 1 2 3 4 5 6 7 6 5 4 3 2 1 1 2 3 4 5 6 5 4 3 2 1 1 2 3 4 5 4 3 2 1 1 2 3 4 3 2 1 12321 121 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
