Question: Java Use a while loop to write a program that keeps reading a value from a user between 0 and 60 in a String or

Java

Use a while loop to write a program that keeps reading a value from a user between 0 and 60 in a String or letter Q to quit and then prints if the number is even or odd.

Typical Run :

Enter a number between 0 and 60 or Q to quit:

33

You entered a correct value >>> the number is Odd

Enter a number between 0 and 60 or Q to quit:

70

invalid input...

Enter a number between 0 and 60 or Q to quit:

60

You entered a correct value >>> the number is even

Enter a number between 0 and 60 or Q to quit:

q

* programm ended *

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!