# Construct a program that reads in an unspecified number of integers...

## Question

Construct a program that reads in an unspecified number of integers from standard input, performs some calculations on the inputted numbers, and outputs the results of those calculations to standard output. The numbers could be delimited by any kind of whitespace, i.e. tabs, spaces, and lines (Note that if you use the Scanner class, you do not have to worry about these delimiters. They will be taken care of). Your program will continue to read in numbers until the number 0 is entered. At this point, the calculations will be outputted in the following format:

The minimum integer is 0
The sum of even integers is 0
The count of positive integers in the sequence is 0
This means that using all numbers your program reads (including the last number 0), you need to compute the minimum, the sum of even integers (can be divided by 2, "num%2 == 0") and count how many positive integers (are greater than 0) in the sequence.

Note that the above is an output for the first test case. For other test cases, you will have different numbers.

Do not prompt to query for the numbers. The number 0 is included in the sequence of integers and should be included in all of your calculations.

Test Case #1
0

Test Case #2
-1 2 0

Test Case #3
-1 -2 -45 -90
1 23 678 90
0

Test Case #4
4 2 0 1 3

Output

Test Case #1
The minimum integer is 0
The sum of even integers is 0
The count of positive integers in the sequence is 0

Test Case #2
The minimum integer is -1
The sum of even integers is 2
The count of positive integers in the sequence is 1

Test Case #3
The minimum integer is -90
The sum of even integers is 676
The count of positive integers in the sequence is 4

Test Case #4
The minimum integer is 0
The sum of even integers is 6
The count of positive integers in the sequence is 2

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

public static void main(String[] args) {

int sum = 0;
int count = 0;
int minimum = 0;
int integer = 1;...

By purchasing this solution you'll be able to access the following files:
Assignment.java.

\$13.50
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

### Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.