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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!