Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mastering Influxdb Database A Comprehensive Guide To Learn Influxdb Database

Authors: Cybellium Ltd ,Kris Hermans

1st Edition

B0CNGGWL7B, 979-8867766450

More Books

Students also viewed these Databases questions

Question

6. What are sacred entities, and how are they profaned?

Answered: 1 week ago

Question

Describe the seven standard parts of a letter.

Answered: 1 week ago

Question

Explain how to develop effective Internet-based messages.

Answered: 1 week ago

Question

Identify the advantages and disadvantages of written messages.

Answered: 1 week ago