Question: Java Programming Write a program that reads integers (ALL INTEGERS ARE ENTERED IN FIRST PROMPT), stop reading when you read a 0. Prompt user just

Java Programming

Write a program that reads integers (ALL INTEGERS ARE ENTERED IN FIRST PROMPT), stop reading when you read a 0.

Prompt user just once to enter integers: "Enter integers, input ends with 0: ". You will output the number of positive integers, negative integers, total count and average using prinf( "%.2f" ).

Here is example of how it should look like

 Enter integers, input ends with 0: 1 2 -1 3 0 //AS YOU CAN SEE ENTERED IN ONE PROMPT The number of positives is 3 The number of negatives is 1 The total count is 4 The average is 1.25 BUILD SUCCESSFUL (total time: 0 seconds) Here is if only zero has been entered run: Enter integers, input ends with 0: 0 No numbers were entered except 0 BUILD SUCCESSFUL (total time: 3 seconds) 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!