Question: Problem 4-Write a program Submit a program called: EvenOdd java Lrs wants to create a program that asks a user to first enter an even
Problem 4-Write a program Submit a program called: EvenOdd java Lrs wants to create a program that asks a user to first enter an even number (continuing to prompt the user for an even number if they do not actually enter an even number). Afterwards, he wants the user to enter an odd number (once again, continuously prompting the user if they do not at first enter an odd number). Once the user has done this, he wants the program to exit saying: ***Thanks! Bye!** He wants to use the following methods (no credit if methods are not used): public static int getUserinput(String message) public static boolean checklfEven(int n) (Feel free to create any additional helper methods). Sample Run: --Enter an even number: That is not even. Enter an even number. 9 That is not even. Enter an even number. 4 --Ok thanks! Now enter an odd number: 4 That is not odd. Enter an odd number. 8 That is not odd. Enter an odd number. 9
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
