Problem

Create a game similar to Hangman in which a player guesses letters to try to replicate a h...

Create a game similar to Hangman in which a player guesses letters to try to replicate a hidden word. Store a two-dimensional array that contains at least five eight-letter words and randomly select one to be the hidden word. (Appendix E contains information on generating random numbers.) Initially, display the hidden word using asterisks to replace each letter. Allow the user to guess letters to replace the asterisks in the hidden word until the user completes the entire word. If the user guesses a letter not in the hidden word, display an appropriate message. If the user guesses a letter that appears multiple times in the hidden word, make sure each correct instance is replaced. When the user completes the word, display a count of the number of guesses that were required. Allow the user to continue to play as many games as wanted. Figure shows a typical game in progress. Save the file as GuessAWord.cpp.

Figure Typical execution of GuessAWord program

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT