Question: 1. Write a Java program that will ask the user to enter four integer numbers and find the greatest and the smallest of these numbers.

 1. Write a Java program that will ask the user to

1. Write a Java program that will ask the user to enter four integer numbers and find the greatest and the smallest of these numbers. The program will then ask the user to enter the choice: 1 (for greatest) and 2 (for smallest). Based on the entered choice, the program displays the greatest or the smallest of these four numbers Sample output is as follows Number 1: 24 Number 2:10 Number 3: 55 Number 4:-10 Enter 1 (for greatest) and 2 (for smallest):2 The smallest of these four numbers is -10

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!