Question: Create a simple guessing game in C++ that the user can play against the computer. Start by creating an enumerated type to represent fruits (have

Create a simple guessing game in C++ that the user can play against the computer. Start by creating an enumerated type to represent fruits (have at least 10 fruits of your choice listed). Generate a random number between 0 and 9 this number will be used to access a random fruit from the list. This will be the computer choice. The program will ask the user to guess the name of the fruit the computer has picked. The user then enters a guess. If the user is right he/she wins. Otherwise the computer wins. The user can play as many times as he/she wants. Once the user decides to quit the game, display the number of times the computer won and the number of times the player won. Write at least two functions: One to handle the input of a fruit as an enumerated type; and one to handle the display of a fruit name.

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!