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 (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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
