Computers and Technology

Write a program to display a calculation game. the game is a question either addition or subtraction for the numbers between 1 and 100. the user needs to answer at least three questions right to pass the game. in each time, generate two random integers, inta and intb, between 1 and 100. then, generate a integer 1 or 2 (between 1 and 2). if the third number is 1, it is an addition question. otherwise, it is a subtraction question. display the question to the user. then, ask the user to enter an answer. if the answer is right, display a message and count one into the number of answering correctly. if the answer is wrong, display a message and do not count one to the number of right answers. this is an example of how it displays a question to the user

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 18:00, teamroper35
Which finger presses the h key on the keyboard? index finger on the left hand pinky finger on the right hand index finger on the right hand thumb on the left hand
Answers: 1
image
Computers and Technology, 23.06.2019 23:00, Maya629277
Lucas put a lot of thought into the design for his company's new white paper. he made sure to include repeating design elements such as color schemes and decorative images. his goal was to a. add symmetry b. create a unified publication c. provide consistency d. save money
Answers: 1
image
Computers and Technology, 24.06.2019 22:30, gabi83
To add additional commands to the quick access toolbar, a user can navigate to the view. backstage status bar design file
Answers: 2
image
Computers and Technology, 25.06.2019 05:10, andyboehm7411
What is the disadvantage of a mesh topology?
Answers: 1
Do you know the correct answer?
Write a program to display a calculation game. the game is a question either addition or subtraction...

Questions in other subjects:

Konu
History, 02.07.2019 20:00
Konu
Biology, 02.07.2019 20:00