C++ Problem 3. Write a program to prompt the user to enter a line of text and re
ID: 3817492 • Letter: C
Question
C++ Problem 3. Write a program to prompt the user to enter a line of text and replace all “is” with “was”. You DON’T have to test whether “is” is one word or part of another word like “This”. Display the updated string on the screen. (15 points) HINT: Read a line from the user. In a loop, find the location of “is”, remove “is” from the string and then insert “was”. Think how you need to terminate the loop. Use C++ string functions. Function remove is not available in our C++ version, so use function erase instead. It has the same syntax.
Explanation / Answer
return 0;
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.