Question: Provide a robust method named getOddDigit which prompts the user to enter an odd digit and returns the odd digit as an int. Read the
Provide a robust method named getOddDigit which prompts the user to enter an odd digit and returns the odd digit as an int. Read the input as a string and verify that the input consists of a single odd digit. If the user enters invalid input, repeat the prompt and input.
Step by Step Solution
3.47 Rating (147 Votes )
There are 3 Steps involved in it
To solve this problem we will need to create a loop that continues prompting the user for input unti... View full answer
Get step-by-step solutions from verified subject matter experts
