#include<iostream> #include<string> using namespace std; int main() { string str; while (getline(cin,str)) { while (str.find("you") != -1) { str.replace(str.find("you"), 3, "we"); } cout << str << endl; } } |
Double click to view unformatted code.