Program Description

Assignment #2 will be the construction of 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.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.