Question: Task: Write a program to play hangman. In hangman, one player thinks of a word and the other tries to guess the word by guessing

 Task: Write a program to play hangman. In hangman, one player

Task: Write a program to play hangman. In hangman, one player thinks of a word and the other tries to guess the word by guessing one letter at a time. The guesser is allowed a fixed number of missed letters such as six; if the word is not guessed before six misses, the guesser loses Hint: To read an input character, use this C snippet: char letter printf("enter a letter: "); scanf(" %c", &letter); printf( "You've entered the letter %c ", letter); The prototypes for the printf) and scanf() C Standard Library functions are defined in the header file Deliverables: A file named hangman.c containing the C source code Input/Output: Use the following sample as a guideline Welcome to Hangman! Try to guess the secret word one letter at a time. # misses left 6 enter a letter: E # misses left 6 enter a letter: A # misses left 5 enter a letter: I # misses left 4 enter a letter: R # misses left 4 enter a letter: 0 # misses left 3 enter a letter: N # misses left 3 enter a letter: # misses left = 3 enter a letter L # misses left 2 enter a letter: U # misses left 1 enter a letter: P YOU LOSE The word is STR ENGTHEN word * * * word = * * * E * * * * E * word = * * * E * * * * E * word = * * * E * * * * E * word = * * R E * * * * E * word - *REE word = * * R EN EN word = * T R E N * T * EN word = * T R E N * T * EN word = * T R E N * T * EN

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!