Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote