Question: Write a complete Java program that inputs a number from the user. Then, your program will display the below shape based on the input number.

Write a complete Java program that inputs a number from the user. Then, your program will display the below shape based on the input number. You need to use a loop structure in order to solve the problem. Assume that the user will enter a positive integer number.Write a complete Java program that inputs a number from the user.

Sample Output 1: Please enter a number: 5 1 2 1 2 3 2 1 2 3 4 3 2 1 2 3 4 5 4 3 2 1 2 3 4 5 4 3 2 1 2 3 4 3 2 1 2 3 2 1 2 1 Sample Output 2: Please enter a number: 3 1 2 1 2 3 2 1 2 3 2 1 2 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!