Question: Q- Write a complete C+ program to play a Guessing Game (Guess a number) with the user. The program should generate a random number and

 Q- Write a complete C+ program to play a Guessing Game

Q- Write a complete C+ program to play a Guessing Game (Guess a number) with the user. The program should generate a random number and ask the user to guess that number. The program also should give the user 5 chances to guess the number. After each trial the computer should print one of the following massages 1. Great... You did it (if the user guessed the correct number). 2. It's too high (if the guessed number larger than the correct number) 3. It's too low (if the guessed number lower than the correct number) And (Unfortunately, You finished all your trails, the correct number is: 6) if the number of trials finished and the user couldn't guess the correct number (for example 6) should inclu following function a. RNumGenerator function that takes nothing and return a random integer number from 0 to 20. In this function you could use predefined function rand0 from the header file the rand function takes no argument and return random integer between 0 and RAND MAX omputer ss Gane-What is the number selected by Me? You have just 5 chances to guess a number between 0-20 Trial (1): Guess a number?14 It's too low Trial (2): Guess a number?115 t's too low Trial (3): Guess a number?120 atYou did it) Process exited after 12.96 seconds with return value 0 55 any key to continue

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!