subject

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

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
What kind of software users of all skill levels create web pages that include graphics, video, audio, animation, and other special effects? website authoring website software website publishing website editing
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Norder to receive financial aid at his vocational school, mario must fill out the fafsa. the fafsa is a form that must be completed to determine . in order to complete a fafsa, you must submit . the fafsa can students obtain
Answers: 2
question
Computers and Technology, 24.06.2019 10:30
Which of the following types of software is most applicable to the promotion of new products through advertising? a.databases b. spreadsheets c. web design programs d. word processing tools
Answers: 2
question
Computers and Technology, 24.06.2019 18:30
How does the use of e-mail benefit business communications? it can be sent at any time. it is faster than regular mail. it improves writing skills. it is less expensive than using a courier. it reduces the need for proofreading.
Answers: 1
You know the right answer?
Write a program to display a calculation game. the game is a question either addition or subtraction...
Questions
question
Mathematics, 06.05.2021 19:40
question
Business, 06.05.2021 19:40
question
Mathematics, 06.05.2021 19:40
question
Mathematics, 06.05.2021 19:40
question
English, 06.05.2021 19:40