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, 23.06.2019 17:30
What are the most commonly found items in the trash according to the municipal solid waste report?
Answers: 1
question
Computers and Technology, 24.06.2019 05:30
If you combine two cells into one, what action are you performing? a.  adding a new row or column      b.  splitting the cells      c.  removing a new row or column      d.  merging the cells
Answers: 2
question
Computers and Technology, 24.06.2019 12:30
Why does the pc send out a broadcast arp prior to sending the first ping request
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
If you want to delete an entire word at a time, which key should you press along with the backspace or delete key?
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
English, 14.01.2021 06:40
question
English, 14.01.2021 06:40
question
English, 14.01.2021 06:40
question
Mathematics, 14.01.2021 06:40
question
Mathematics, 14.01.2021 06:40
question
Chemistry, 14.01.2021 06:40
question
Computers and Technology, 14.01.2021 06:40
Questions on the website: 13722360