Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I would like to know how to do this problem because I don't know how to use do loops. I also struggle with using string
I would like to know how to do this problem because I don't know how to use do loops. I also struggle with using string as well so could someone please explain to me the solution and how you did it. I tried answering the question below but ran out of time.
In C++ language please and Thank you
on Ste en Ster The do while loop should not be your first choice when writing an iterative solution As a general rule, if you can solve the problem reasonably with a while loop then you should do that. MS With that being said, there is no reason why we can't practice it a little bit. For this question you are going to create a simple word guess game. Create a 4-character word and output it to the screen. Replace two of the characters with the * (asterisk). Ask the user to guess the word. You should use a do-while loop to input the guess. When the correct word is has been entered your loop should exit and you should out the number of guesses it took to correctly guess the word. Here is an example: Can you guess the word? MSJC Ster SON), MSJC httpenn Stevenson, MSUO Jenn Glenn Ste hemp Sorry incorrect, try again help Correct, It took two guesses to guess correctly. Refresher You can use the equality operator == to compare strings if(str == "help") Glenn Ste Your Answer: //Couldn't finish problem in time// #includeStep 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