Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago