Question: Write a Java program that takes input 3 floating-point numbers and sends output the maximum and minimum value. Find the most efficient solution. The processing
Write a Java program that takes input 3 floating-point numbers and sends output the maximum and minimum value. Find the most efficient solution. The processing will take place in a sentinel controlled loop, like in the following sample output:
Sample output:
Min/Max problem for 3 floating-point numbers ============================================ Do you want to start (Y/N): y Enter 3 float values: 1.2 2.3 3.4 You entered 1.2, 2.3, 3.4 Min = 1.2 Max = 3.4
Do you want to continue (Y/N): y Enter 3 float values: 2.3 1.2 4.5 You entered 2.3, 1.2, 4.5 Min = 1.2 Max = 4.5
Do you want to continue (Y/N): y Enter 3 float values: 4.5 3.4 1.2 You entered 4.5, 3.4, 1.2 Min = 1.2 Max = 4.5
Do you want to continue (Y/N): n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
