Lab_3_Hangman_-_strings - Emphasison:/strings WriteaC ....

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Emphasis on: One-dimensional arrays/strings Write a C++ program to play a version of the game hangman.  This is an interactive game where the  program chooses a word/phrase (maximum of 25 characters) and presents it to the player as a series of  dashes or underscores representing a letter in the word/phrase.  The program also displays the letters of the  alphabet.  The player selects a letter.  If that letter is part of the word/phrase, the program displays the  dashes with the letter replacing the dash in the appropriate place(s) and displays the alphabet with that letter  blanked or marked out.  When the player selects a letter that is not part of the word/phrase, the number of  guesses is decremented.  If the player can complete the word/phrase before guessing wrong 10 times, the  player wins.  If the player loses, the program then displays the answer by filling in all the letters to reveal the  word/phrase. For instance, if the word/phrase is TWO THUMBS UP, the program might display something like this (with 
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 3

Lab_3_Hangman_-_strings - Emphasison:/strings WriteaC ....

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online