Using a char array, loops, and if statements design a program that plays a game of hangman
Fantastic news! We've Found the answer you've been seeking!
Question:
Using a char array, loops, and if statements design a program that plays a game of hangman using the predetermined words "data structures" that the player will guess (reference in class example).
In each round of the game your program should:
- Display which round of the game we're on
- Display the correctly guessed letters and/or underscores to indicate letters yet to be guessed
- Prompt for a new letter (Note: space characters do not need to be guessed)
- Determine if there are any matches, and announce how many
- Detect if the game is complete, if so announce this condition and end the program, else proceed to next round
Bonus: 10 pts Modify this program to accept any word(s) from the user as the word(s) to be guessed
Related Book For
Posted Date: