Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I'm having an issue with this code. I believe it has to do with the getline/cin.ignore()/cin part. When I run the code and choose 1,
I'm having an issue with this code. I believe it has to do with the getline/cin.ignore()/cin part. When I run the code and choose 1, I am asked to enter a phrase, which I enter. But as soon as I hit enter for the phrase, an infinite loop occurs. It should be asking me to enter a letter. What am I doing wrong?
1 #include > choice; if ( choice == 1) if (numTurns > 3) cout letter numTurnst+; 34 35 36 37 38 while (choice != 3); return 0; 39 40Step 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