Question: In Java Please Write a program that selects two random numbers -20 to 20. The two numbers would get displayed with + between

In Java Please Write a program that selects two random numbers -20 to 20. The two numbers would get displayed with " + " between them followed by "= ". The user should enter the sum of the two numbers. The program should print "Incorrect" if the user enters a wrong answer and re-prompts the user to re-enter the answer again. Limit the number of incorrect tries to 3. After 3 incorrect tries print the correct answer. The program should print a message like "Correct!" if the user enters the right answer.

The program would then display "Would you like another problem y/n? ". If user selects "y" or "Y" you show them another problem to be solved. -10 + 19 = 8 Incorrect. The correct answer is 9 Would you like another problem y/n? f Don't understand f Would you like another problem y/n? n

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!