Need some help writing a simple search and replace program for class. It's supposed to work like the search in replace in a simple text editor. Due to a retiring prof last semester, much of this wasn't covered and I am being thrown head first into it. Not looking for the entire prog, just a few pointers to get me started.
What it needs to do:
//1 User to enter sentence
//2 Display user sentence
//3 User to select word to replace
//4 User inputs word to replace selected word
//5 Prints sentence with word replaced
//6 Asks user if they want to repeat
//7 Prog repeats till user exits
If anyone has any tips on how to get started please let me know. I am not sure how to search a user string and replace their selected substring with a new substring they input.
do {
Ask for the sentence
Ask for the word to be replaced
Ask for the word to replace with
Do the replacing
Print out the result
Ask the user if he wants to continue
} while (the user wants to continue);