Question: Write a program that reads a sequence of floating point numbers from the keyboard and outputs the average and the maximum element in the sequence.
Write a program that reads a sequence of floating point numbers from the keyboard and outputs the average and the maximum element in the sequence. The sequence has at least one number and is terminated by will not appear in the sequence other than as the end marker
Use the following statements so that the program displays the values with two digits after the decimal points.
System.out.printfAverage: f
average;
System.out.printfMaximum: f
max;
Check the Test Cases Console on the right for more details. The test cases will show when you click on the task.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
