*5.1 (Count positive and negative numbers and compute the average of numbers) Write a program that reads an unspecified number of integers, determines how many positive and negative values have been...


How do I write this program in Java?


*5.1<br>(Count positive and negative numbers and compute the average of numbers) Write a<br>program<br>that reads an unspecified number of integers, determines how many positive<br>and negative values have been read, and computes the total and average of the input<br>values (not counting zeros). Your program ends with the input 0. Display the average<br>as a floating-point number. If no input is entered, display java Exercise05_01 Enter integers ending with 0: 1 2 -1 3 e The number of positives is 3 The number of negatives is 1 The total is 5 The average is 1.25 JDK8> "/>
Extracted text: *5.1 (Count positive and negative numbers and compute the average of numbers) Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, and 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 no input is entered, display "No numbers are entered except 0". Sample Run for Exercise05_01.java Enter input data for the program (Sample data provided below. You may modify it.) 1 2 -1 3 e Show the Sample Output Using the Preceeding Input Reset Execution Result: JDK8>java Exercise05_01 Enter integers ending with 0: 1 2 -1 3 e The number of positives is 3 The number of negatives is 1 The total is 5 The average is 1.25 JDK8>

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here