Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started