Question: MaxAvg.java: Write a program that reads an integer number from keyboard, say 100. After that, the program will read so-many double numbers and displays the
MaxAvg.java: Write a program that reads an integer number from keyboard, say 100. After that, the program will read so-many double numbers and displays the maximum and average of them. Please consider the extreme case when all numbers are negative. For instance, by given -1.5, -2.5, , -100.5, the maximum will be -1.5. When you test your program correct, you can try a small number such as 5.
Please focus on the practice of loop in this assignment and DO NOT use any advance concept such as method, array, or built-in support of String/objects (Note that using String variable is ok for file processing). The learning outcome is to develop the code RIGHT with counter- and event-control loops, accumulation loop (i.e., applying functional process inside loop body), and nested loop (i.e., using inner loop inside the outer loop body).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
