subject

For this lab you will write a Java program that will run a simple math quiz. Your program will generate two random integers between 1 and 20 and then ask a series of math questions. Each question will be evaluated as to whether it is the right or wrong answer. In the end a final score should be reported for the user. This is a sample transcript of what your program should do. Items in bold are user input and should not be put on the screen by your program.

Enter your name: Jeremy
Welcome Jeremy! Please answer the following questions:

4 + 6 = 10
Correct!

4 * 6 = 24
Correct!

4 / 6 = 1
Wrong!
The correct answer is 0

4 % 6 = 4
Correct!

You got 3 correct answers
That's 75.0%!

Your code will behave differently based on the random numbers it selects and the answers provided by the user. Here is a second possible execution of this code:

Enter your name: Bob
Welcome Bob! Please answer the following questions:

3 + 3 = 0
Wrong!
The correct answer is 6

3 * 3 = 6
Wrong!
The correct answer is 9

3 / 3 = 0
Wrong!
The correct answer is 1

3 % 3 = 1
Wrong!
The correct answer is 0

You got 0 correct answers
That's 0.0%!

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:00
Which database model is best used for data warehouse and data mining
Answers: 3
question
Computers and Technology, 22.06.2019 20:00
Which type of file can be used to import data into a spreadsheet?
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
1. which of the following is a search engine? a) mozilla firefox b)internet explorer c)google d)safari 2. which of the following statements is true? a) all search engines will provide the same results when you enter the same query. b) all search engines use the same amount of advertisements. c) some search engines are also browsers. d) search engines often provide different results, even when you enter the same query.
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
Apunishment or the threat of punishment used to enforce conformity. select the best answer from the choices provided t f
Answers: 1
You know the right answer?
For this lab you will write a Java program that will run a simple math quiz. Your program will gener...
Questions
question
Health, 18.02.2021 01:20
question
Mathematics, 18.02.2021 01:20
question
Chemistry, 18.02.2021 01:20
question
English, 18.02.2021 01:20
question
Mathematics, 18.02.2021 01:20
Questions on the website: 13722363