Question
Java Programming In this assignment, you will need to accept input from the user and print out the word that corresponds to it. For example,
Java Programming
In this assignment, you will need to accept input from the user and print out the word that corresponds to it. For example, if the user inputs the number 2 at the prompt, your program needs to output the word "two".
Your program needs to accept input in a range from 0 to 9 (not all numbers, of course!). If the input is out of that range, you need to give the user an error message. However, this time, you don't tell them to run the program again, you tell them to enter the number again and again and again. That's right. They get 3 tries and then you tell something appropriate and end the program.
I suggest using the do-while loop for this assignment. But whatever works best for you is perfectly ok. Whatever you use, you need to comment your code appropriately.
Be efficient in your coding. Make sure to compile and test your program before turning it in.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started