Question: Write a program in JAVA that will ask the user to enter 7 random numbers from 1 to 20. The numbers should be separated by
Write a program in JAVA that will ask the user to enter 7 random numbers from 1 to 20. The numbers should be separated by space and the last number should be a zero to indicate end of number list. Hint: Use a while statement to accept user input and an if statement to determine maximum value.
Display the total of the seven numbers. Display the maximum value of the seven numbers.
Example: Enter a number from 1 to 20 separated by space. When done enter 0.
Test your code by enter the following values: 1 5 7 3 11 9 8 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
