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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 13:30, ReaLily
1. technician a says horsepower information can be used by consumers to compare the power of different automobile engines. technician b says that manufacturers will often list the horsepower output of their engines in the online service information. who is right?
Answers: 2
image
Computers and Technology, 23.06.2019 07:30, jackie0833
Which option allows you to view slides on the full computer screen?
Answers: 1
image
Computers and Technology, 23.06.2019 10:20, chonawilson4
Suppose there is a relation r(a, b, c) with a b+-tree index with search keys (a, b).1. what is the worst-case cost of finding records satisfying 10 < a < 50 using this index, in terms of the number of records n1, retrieved and the height h of the tree? 2. what is the worst-case cost of finding records satisfying 10 < a < 50 and 5 < b < 10 using this index, in terms of the number of records n2 that satisfy this selection, as well as n1 and h defined above? 3. under what conditions on n1 and n2, would the index be an efficient way of finding records satisfying the condition from part (2)?
Answers: 1
image
Computers and Technology, 23.06.2019 17:00, evanwall91
What does the faves button do? a. users mark a web page as a favorite b. leads other readers to favor a specific page c. readers sort and align their favicons, or favorite icons d. leads users to a message board where they can post questions
Answers: 1
You know the right answer?
Design a program that gives simple math quizzes. the program should display two random numbers that...

Questions in other subjects: