Question: Please help me about this. The third is input and output. Primitive Data iypes Basic I/O Expressions Conditional and Loop statements Program Description Assignment #2

 Please help me about this. The third is input and output.
Primitive Data iypes Basic I/O Expressions Conditional and Loop statements Program DescriptionPlease help me about this. The third is input and output.
Assignment #2 will be the construction of a program that reads in

Primitive Data iypes Basic I/O Expressions Conditional and Loop statements 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 count of integers is The count of prime numbers is 0 The count of negative integers is 0 The count of integers divisible by.3 is 1 This means that using all numbers your program reads (including the last number 0). you need to count how many integers are read, compute the count of prime numbers (prime numbers are greater than, and not inluding, I), compute the sum of negative integers (are lesser than 0) and count how many integers are divisible by 3 ( "num%3 0) are 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. Input The attached files: inputl.txt, input2.txt, input3.txt, input4.txt are the test cases that will be used as input for your program (Right-click and save) Output

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!