Question: write a C program that plays a number guessing game with the user. A sample run of the game program would be as follows (user

write a C program that plays a number guessing game with the user. A sample run of the game program would be as follows (user input is in Bold Face).

Welcome

I will select a number between 1 and 200.

And you will try to guess what number. If you are incorrect, I will let you know if you guessed to high or to low.

You have 6 attempts.

Try to guess

Your guess? 50

To high

Your guess? 12

To Low

Your guess? 223

Error. Must be between 1 and 200.

Your guess? 23

**** Right Answer ******

would you like to play again? sure

Try to Guess

Your guess? 85

To High

Your guess? 12

To low

your guess? 57

***** Right Answer*******

Would you like to play again? Nope

Ok then see you later

Hint: Use functions rand() and srand() to establish the number to be guessed so that the number will be different each time the game is played.

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!