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 06:00
What role do chromosomes play in inheritance?
Answers: 1
question
Computers and Technology, 22.06.2019 11:40
Pthreads programming: create and terminate a thread write a c++ program that creates a thread. the main will display a message “hello world from the main”. the main will create a thread that will display a message “hello world from the thread” and then terminates with a call to pthread_exit()
Answers: 3
question
Computers and Technology, 23.06.2019 00:00
Suppose you have 9 coins and one of them is heavier than others. other 8 coins weight equally. you are also given a balance. develop and algorithm to determine the heavy coin using only two measurements with the of the balance. clearly write your algorithm in the form of a pseudocode using the similar notation that we have used in the class to represent sorting algorithms
Answers: 1
question
Computers and Technology, 23.06.2019 00:10
My has been slow anyone else’s ?
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, 18.11.2019 02:31
question
Mathematics, 18.11.2019 02:31
question
Mathematics, 18.11.2019 02:31
question
Mathematics, 18.11.2019 02:31
Questions on the website: 13722367