C++. Need help writing a program that plays the game of Hangman. The program should pick a word (which is either coded directly into the program or read from a text file) and display the following:
profile-image
Time remaining:
00
:
09
:
42
Computer Science
C++. Need help writing a
Guess the word: XXXXXX
Each X represents a letter. The user tries to guess the letters in the word. The appropriate response yes or no should be displayed after each guess. After each incorrect guess, display the diagram with another body part filled. After seven incorrect guesses, the user should be hanged. The display should look as follows:
O
/|\
|
/ \
After each guess, display all user guesses. If the user guesses the word correctly, display: " Congratulations!!! You guessed my word. Play again? yes/no "
Please help in making this code and if possible to include steps to learn what most of the lines and functions do in order to understand it better. Thank you.
Step by step
Solved in 2 steps