Question: Design and code the program to display the input and output for the Hangman program. Use your last name as the word to guess. Each
Design and code the program to display the input and output for the Hangman program. Use your last name as the word to guess. Each letter will be a char data type. Start by having the user enter 5 letters to guess. You will be creating a Hangman program. In this game, the computer will have a hard coded word and the user will enter one letter at a time until he or she has guesses the correct word.Ascore wil be tallied that will be the number of incorrect guesses the user has. So a smaller score is better. Initially the word will be displayed as a list of special characters such as or The user will input one letter at a time and each input will be compared with the word. If the guess is correct the letter will be displayed rather than the special character. Each incorrect guess will increment the score. When the user guesses the correct word the game will be over. Below is an example of the program running
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
