subject

Design a program that gives simple math quizzes. the program should display two random numbers that are to be added, such as: 247 129. the program (java language) should allow the student to enter the answer. if the answer is correct, a message of congratulations should be displayed. if the answer is incorrect, a message showing the correct answer should be displayed. here is the pseudo-code to follow
//declare the variables to hold intermediate and final values
declare integer rand1, rand2, sum ans
//get the random numbers generated by the function
//random and assign those values in rand1 and rand2 respectively
set rand1 = random(1, 999)
set rand2 = random(1, 999)
//dsiplay rand1 and rand2 in a formatted way treated for addition
display

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
6. the is particularly susceptible to the effects of alcohol because it receives a large portion of total blood flow and has a high concentration of neurons. a. heart b. pancreas c. brain d. liver
Answers: 2
question
Computers and Technology, 22.06.2019 11:30
Awell-diversified portfolio needs about 20-25 stocks from different categories.
Answers: 2
question
Computers and Technology, 22.06.2019 14:30
Hi plz 11 ! when planning a table, what step comes first: "define the column headers" or "calculate the number of columns/rows"? a. calculate the number of columns/rows b. define the column headers
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
How is the number 372 written when expanded out to place values in the base 8 (octal) number system? a. 2 x 4 + 3 x 2 + 4 x 1 b. 3 x 64 + 7 x 8 + 2 x 1 c. 3 x 8 + 7 x 7 + 2 x 6 d. 3 x 100 + 7 x 10 + 2 x 1
Answers: 1
You know the right answer?
Design a program that gives simple math quizzes. the program should display two random numbers that...
Questions
question
Mathematics, 15.12.2021 06:00
Questions on the website: 13722359