Question: use java This Lab creates a program for a user to practice subtractions. The program randomly generates two random single-digit integers number1 and number2 ,
use java
This Lab creates a program for a user to practice subtractions. The program randomly generates two random single-digit integers number1 and number2 , makes sure that number1 >= number2 and displays a question (e.g., if number1=9 and number2 = 2)
such as What is 9 2? to the student. After the student types the answer, the program displays whether the answer is correct. If incorrect print message with what the math problem was and the correct number.
Use following to generate thw two random numbers:
int number1 = (int)(Math.random() * 10); int number2 = (int)(Math.random() * 10);
EXTRA CREDIT: Also enter number between 1 and 3 for correct answers required and keep doing it until student gets that many correct answers with UP TO 6 TRIES. If student has three errors exit and print they failed. If do correct output success. DO NOT USE LOOP ONLY IF statements.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
