View the step-by-step solution to:

hello dear, please can you help me in this question?

hello dear, please can you help me in this question?

Q1/ Use a while loop to make 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 *

Top Answer

The sample output when the program is run, is as follows: Enter a number between 0 and 60 or Q to quit: 33... View the full answer

Capture.PNG

Sign up to view the full answer

Other Answers

import java.util.Scanner; public class ReadValues { public static void main ( String[] args ) { Scanner inp = new... View the full answer

import java.util.Scanner; public class Test { public static void main ( String[] args ) { // create an object of the Scanner... View the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online