Question: Write C++ program to play a simple one person game. First let the computer generate four random integer numbers between 0 and 100 (inclusive). Then

Write C++ program to play a simple one person game. First let the computer generate four random integer numbers between 0 and 100 (inclusive). Then the program should ask user to guess a number that is in the middle of the numbers generated by the computer. That is, we want a number that is larger than two of the numbers generated by the computer and smaller than the other two numbers generated by the computer. the user will get 100 points if they manage that. If the user enters a number that is either larger than three computer numbers (and smaller than the fourth one) or smaller than three computer numbers (and larger than the fourht one) they will get 50 points. If the number user entered is smaller than all the computer numbers or larger than all computer numbers they will get 0 points.

Let the user play the game 5 times and compute and display the total score.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!