Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a C++ program for a guessing game. Create a string for the word starfish in all lowercase letters. Let the user guess the word

Create a C++ program for a guessing game. Create a string for the word "starfish" in all lowercase letters. Let the user guess the word and tell them whether or not the correct word (starfish) is longer or shorter than their guess. Once the user guesses a word with the same amount of characters (8) tell them how many letters are correct (meaning how many letters are in the correct location and correct case).

(Example:

Guess the word: cat

The correct word is longer

Wrong answer, Guess again: flapjack

1 letter(s) is/are correct

Wrong Answer, Guess again : )

Use loops to repeat the program until the user guesses the word starfish. When they guess the correct word, let them know. This must be done only inside int main(). Do not use break statements.

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

Students also viewed these Databases questions