. Conduct a quiz that contains 4 questions. Each question has 4 possible answers. Ask a user to choose the correct answer for each question. If the user choose the correct answer, add 1 point. Display the total points user earned at the end of the quiz.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 19RQ
icon
Related questions
Question

*Using IF Statements*

1. Conduct a quiz that contains 4 questions. Each question has 4 possible answers. Ask a user to choose the correct answer for each question. If the user choose the correct answer, add 1 point. Display the total points user earned at the end of the quiz. 

2. Ask a user to enter 4 integers and display the largest integer the user entered.

1. What is the value of the follwoing Boolean expression: 51-5?
a) 5
b) 1
c) 8 d) 10
Great! it is correct.
一益
2. What is the value of 12%6?
a) 0
b) 2
c) 12
d) 6
a
Great! it is correct.
3. What is the capital city of P. R. China?
a) Tokyo
b) Bankok c) Shanghai d) Beijing
Sorry, it is incorrect.
4. Which of the followings translates a program from C++ to machine language?
a) RAM
d.
Sorry, it is incorrect.
b) Compiler
c) Monitor
d) Keyboard
----
The total points: 2
=====================:
Please enter 4 integers:
5 1 22 7
The largest number you entered is 22
Transcribed Image Text:1. What is the value of the follwoing Boolean expression: 51-5? a) 5 b) 1 c) 8 d) 10 Great! it is correct. 一益 2. What is the value of 12%6? a) 0 b) 2 c) 12 d) 6 a Great! it is correct. 3. What is the capital city of P. R. China? a) Tokyo b) Bankok c) Shanghai d) Beijing Sorry, it is incorrect. 4. Which of the followings translates a program from C++ to machine language? a) RAM d. Sorry, it is incorrect. b) Compiler c) Monitor d) Keyboard ---- The total points: 2 =====================: Please enter 4 integers: 5 1 22 7 The largest number you entered is 22
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT