Answered step by step
Verified Expert Solution
Link Copied!

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

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

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago