View Code of Problem 3496

#include<iostream>
#include<string>
using namespace std;
//replace()函数的使用

int main() {
	string s;

	while (getline(cin, s)) {
		while (s.find("you") != -1) {
			s.replace(s.find("you"), 3, "we");
		}
		cout << s<<endl;
	}
	
	return 0;
}

Double click to view unformatted code.


Back to problem 3496