I’ve got 99 problems but Java ain’t one of them. You will write a program that asks a user how many problems they have- In your prompt instruct them to enter a number between 3 and 99. (Check to make...

I’ve got 99 problems but Java ain’t one of them. You will write a program that asks a user how many problems they have- In your prompt instruct them to enter a number between 3 and 99. (Check to make sure they comply.) You will then print a line for each of their problems finishing off with a line saying they have no problems. You will then ask if they have any more problems to start the process again. Finish your program with a pleasant output line to let the user know he/she is done. Hints: You need to account for the difference between 1 “problem” and 2 or more “problems”. Since you are using inputs of an integer and a string value you may consider either 2 scanner objects or you will have to parse the integer out of a string. If your outer loop repeats on an input of “yes” or “y” then make sure to use the scannerName.equals rather than the == syntax. Example output: How many problems do you have? (Enter a number 3-99) 2 I’m sorry you need to enter a number between 3 and 99, please re-enter an integer in that range. How many problems do you have? (Enter a number 3-99) 4 You have 4 problems but Java ain't one You have 3 problems but Java ain't one You have 2 problems but Java ain't one You have 1 problem but Java ain't one 54 You got no problems left. 55 Do you want more problems: Yes or No? 56 yes 57 How many problems do you have? (Enter a number 3-99) 3 58 You have 3 problems but Java ain't one 59 You have 2 problems but Java ain't one 60 You have 1 problem but Java ain't one 61 You got no problems left. 62 Do you want more problems: Yes or No? 63 no 64 I'm glad you are OK.*/
May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here