Question: IN C++ Write a program that reads from standard in three things: a word to find, a word to replace with, and single line of
IN C++
\Write a program that reads from standard in three things: a word to find, a word to replace with, and single line of text to perform the find-replace on.
The program should output the three things, as well as, the line after performing the find and replace . the input and output is as given below:
.

INPUT OF THE TEST CASE 1 cat dog My favorite animal is the cat. Because cats like to play. This line does nothing! YOUR CODE'S OUTPUT did not compile/run! THE CORRECT OUTPUT OF THE TEST CASE 1 Find Word: "cat", 2 Replace Word: "dog" 3 Pre Line: " My favorite animal is the cat. Because cats like to play. " Post Line: " My favorite animal is the dog. Because dogs like to play. " INPUT OF THE TEST CASE Wolverines Spartans 2 My mascot is the fighting 'Wolverines'! 3 This line does nothing! YOUR CODE'S OUTPUT 1 did not compile/run! -- -- - THE CORRECT OUTPUT OF THE TEST CASE UwN Find Word: "Wolverines" 2 Replace Word: "Spartans" Pre Line: " My mascot is the fighting 'Wolverines'!" Post Line: "My mascot is the fighting 'Spartans
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
