Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C++ Language First you need to ask the user to enter a letter. Then you'll check if that letter exists in your secret word.

Using C++ Language

image text in transcribedimage text in transcribed

First you need to ask the user to enter a letter. Then you'll check if that letter exists in your secret word. If it does exist, then you should tell the user and display the puzzle with the letter revealed. If the letter does not exist, then inform the user that the letter is not found. You will repeat this process until all the correct letters have been guessed or the user has entered 7 wrong letters Hopefully it is readily clear that you will need to use a loop to keep prompting the user to enter a letter. You will also need to use conditionals to check if the letter exists. You will need to use an array to store the secret letters (since a word is just a collection of letters). We'll also need arrays to keep track of the previously guessed letters (we don't want the player to guess wrong a second time) and the solved letters An example of a winning game Welcome to Hangman!! Take a guess: Your guess: a There's a A! Take a guess: Your guess: C Sorry, no c's. You have 6 wrong guesses remaining. Take a guess: Your guess: a You already guessed A. Take a quess: PRO RA M M I N Your guess: g There's a G! CONGRATS! You solved the puzzle: PROGRAMMI N G

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions

Question

5. How do economic situations affect intergroup relations?

Answered: 1 week ago

Question

Brief the importance of span of control and its concepts.

Answered: 1 week ago

Question

What is meant by decentralisation?

Answered: 1 week ago

Question

Write down the Limitation of Beer - Lamberts law?

Answered: 1 week ago

Question

Discuss the Hawthorne experiments in detail

Answered: 1 week ago