Question: You will be creating a game. Game rules: a) Randomly generate a number between 0-9. b) Let the player guess the number. c) Count how

 You will be creating a game. Game rules: a) Randomly generate

You will be creating a game. Game rules: a) Randomly generate a number between 0-9. b) Let the player guess the number. c) Count how many times until the player gets it correct. Programming requirements: In this C++ assignment, you will design and create a procedural program, with necessary user-defined functions, using either pass-by-value or pass-by- reference, value-returning or void. In one of the user-defined functions, please use static local variable. (Hint: You may design a function to collect the number of times the player" has guessed the number.) If you are not sure how to create random number, you may follow the instructions below. 1) Include the following two libraries in your program #include #include 2) Put the following statement in your main() function. stand time(NULL ); // this is the seed value of the random number 3) Use Land) 110 in your user-defined function. The expression generates a random number between 0-9. Sample screen display: Is it 17 Is it 97 Good job. After times, you've got the number right. It is (Ctrl)

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!