View Code of Problem 3496

#include<iostream>
#include<string>
using namespace std;
int main()
{
	string s;
	while(getline(cin,s))
	{
		int place=s.find("you");
		while(place!=-1)
		{
			s=s.replace(place,3,"we");
			place=s.find("you");
		}
		cout<<s<<endl;
	}
}

Double click to view unformatted code.


Back to problem 3496