Question: using java: This example creates a program for user to practice subtractions. The program randomly generates two single-digit integers number1 and number2 , makes sure
using java:
This example creates a program for user to
practice subtractions. The program randomly generates two single-digit integers number1 and number2 ,
makes sure that number1 >= number2 and displays a question 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.
Execute the program at least two or more times showing results
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. Following generates two random numbers 0-9
int number1, number2;
number1 = (int)(Math.random() * 10);
number2 = (int)(Math.random() * 10);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
