Answered step by step
Verified Expert Solution
Question
1 Approved Answer
unknown1.txt is elephent unknown2.txt is neanderthal EEEN20010 Computer Engineering. The game of hangman (hangman) You are expected to demonstrate a working C program according to
unknown1.txt is elephent
unknown2.txt is neanderthal
EEEN20010 Computer Engineering. "The game of hangman" (hangman) You are expected to demonstrate a working C program according to the description below. Your program should be uploaded (via Blackboard) before the deadline. You must use the file name specified in te problem description below. Late submissions will not be corrected and will receive zero credit, so even if your program is not running correctly, you should submit your "best attempt Program description In the game of hangman, one player picks a word, and the other player has to try to guess what the word is by selecting one letter at a time. If they select a correct letter, all occurrences of the letter are shown. If no letter shows up, they use up one of their turns. The player is allowed to use no more than 10 incorrect turns to guess what the word is. They can guess the word at any time, but if they guess incorrectly, they lose a turn. To simulate this game on a computer, the unknown word is stored in a simple text file (which only stores one word). The computer ll display the word but with asterisks in place of letters. This lets the player know how many letters are in the word. The player is then asked to guess one of the 26 letters, or to guess what the word is. If they choose a letler, an updated version of the word is shown with that letter filled in, and their number of remaining turns remains fixed. If they make an incorrect guess, they lose a turn, The program execuion should look like the following (user input in bold text): Give the filename with the unknown word unknown1.txt Ready to Start! Number of turns remaining: 10 Would you like to guess the word w or guess a letter [1]: 1 What lettor have you chosen? a Good choice! The word is: a+* Number of turns remaining: 10 Would you like to guess the word lw or guess a letter L1] : 1 What letter have you chosen?:o Bad Choice The word is:*a Number of turns remaining: 9 Would you like to guess the word [w or guess a letter [1]: 1 What letter have you chosen?: e God Choice ! The word is: ee**a** Number of turns remaining: 9 Would you like to guess the word [w] or guess a letter [1 1 What letter have you chosen?: t etcStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started