Question: (Intro to Java help?) Write a static method named evenNumbers that accepts a Scanner from the console. The method should repeatedly prompt the user to

(Intro to Java help?) Write a static method named evenNumbers that accepts a Scanner from the console. The method should repeatedly prompt the user to enter integers until 3 consecutive even integers are entered. When 3 consecutive even numbers are seen, the method should output a message including the total number of entries.

You may assume that the user will enter a single integer after each prompt. Here is a sample dialog of user interaction with the program.

Looking for three even numbers in a row.

Type a number: 44 Type a number: 15

Type a number: 23 Type a number: 2

Type a number: 12

Type a number: 34

Three even numbers found after 6 total entries

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!