In java Write a program that does the following:- reads an unspecified number of integers- determines how many positive and negative values have been read- computes the total and average of the input values (not counting zeros). Your program ends with the input 0. Display the average as a floating-point number. If the entire input is 0, the program displays “No numbers are entered except 0”. the numbers are: 1, 2, -1, 3, 0

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 15PE
icon
Related questions
Question

In java Write a program that does the following:
- reads an unspecified number of integers
- determines how many positive and negative values have been read
- computes the total and average of the input values (not counting zeros).

Your program ends with the input 0.

Display the average as a floating-point number.

If the entire input is 0, the program displays “No numbers are entered except 0”.

the numbers are: 1, 2, -1, 3, 0

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Files and Directory
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT