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, 21.06.2019 21:40
Which is a benefit of getting information from a government website? a. the information will be easy to understand. ob. the information will be the most current. oc. the information can be trusted.
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
So im doing this school challenge and the teachers said whats the average text a student gets a day so i need to get about 20 in a day but dont know how can you guys 2163371293
Answers: 2
question
Computers and Technology, 23.06.2019 20:40
On nba 2k 19, every time i try to join a my park game, it leads ro a website telling my dad that he needs ps plus. i already have ps plus though. how do i fix this?
Answers: 2
question
Computers and Technology, 24.06.2019 07:00
Selective is defined as paying attention to messages that are consistent with one’s attitudes and beliefs and ignoring messages that are inconsistent.
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
Geography, 15.10.2020 17:01
question
Mathematics, 15.10.2020 17:01
question
Mathematics, 15.10.2020 17:01
question
Mathematics, 15.10.2020 17:01
question
Mathematics, 15.10.2020 17:01
question
Mathematics, 15.10.2020 17:01
question
Mathematics, 15.10.2020 17:01
Questions on the website: 13722362