Question: 3. Write a Java program that first asks the user how many numbers will be entered - let's call this positive integer n. Then

3. Write a Java program that first asks the user how many numbers will be entered - let's call this positive 

3. Write a Java program that first asks the user how many numbers will be entered - let's call this positive integer n. Then the program takes input integers (not ordered) and outputs how many even values and how many odd values have been entered. Input control: the input should be restricted to only integers between 0 and 100. SAMPLE OUTPUT: How many numbers in input? 10. Now enter 10 integers: 123 ERROR! Valid range 0 - 100. REENTER: 1 2 3 129 ERROR! Valid range 0 - 100. REENTER: 4 5 6 7 176 ERROR! Valid range 0 - 100. REENTER: 8 9 10 You entered 5 odd numbers and 5 even numbers.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Youve provided an image that contains instructions for writing a Java program along with sample outp... View full answer

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 Programming Questions!