Just trying to code in JAVA here and need a little help lol Write an application
ID: 3777263 • Letter: J
Question
Just trying to code in JAVA here and need a little help lol
Write an application to determine if the digits in a three-digit number are all odd, all even, or moxed odd and even. Your application should prompt the user to input a three-digit number. If the digits in the number all all odd, write "This number contains all odd digits." If the digits are all even, write "This number contains all even digits." If the number contains both odd and even digits, write "This number contains both odd and even digits." Use integer division and modulus to access the digits in the number.
Explanation / Answer
Please find the required program along with its output. Please see the comments against each line to understand the step.
------------------------------------------------------------------------
OUTPUT:
Enter 3 digit number:
156
This number contains both odd and even digits.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.