Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help. Write a Java program that asks the user to enter 1 0 positive integer values, or to quit early, enter a negative number.

Please help.
Write a Java program that asks the user to enter 10 positive integer values, or to quit early, enter a negative number. After the user finishes entering their values, display the following information:
The total number of positive values entered.
The total sum of all the values entered.
The average value as a decimal number (real number).
Output and Testing:
It is important to test your program with different data values and scenarios. Run your program and test it with the criteria below. Take a screenshot of the output console for each test case. You will be submitting the screenshots along with your program code.
Enter 10 positive integers.
Enter 5 positive integer values and then a negative number.
Enter no positive integers and start with a negative number.

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

Discuss the consequences of ethical misconduct.

Answered: 1 week ago

Question

Explain the steps involved in training programmes.

Answered: 1 week ago

Question

What are the need and importance of training ?

Answered: 1 week ago