you转化为we
#include<bits/stdc++.h>
using namespace std;
int main()
{
char a[1005];
while(gets(a)!=NULL)
{
int l=strlen(a);
int i;
for(i=0;i<l;i++)
{
if(a[i]=='y' && a[i+1]=='o' && a[i+2]=='u')
{
cout<<"we";
i+=2;
}
else {
cout<<a[i];
}
}
cout<<endl;
}
return 0;
} //you转化为we
we转化为you
#include<bits/stdc++.h>
using namespace std;
int main()
{
char a[1005];
while(gets(a)!=NULL)
{
int l=strlen(a);
int i;
for(i=0;i<l;i++)
{
if(a[i]=='w' && a[i+1]=='e')
{
cout<<"you";
i+=1;
}
else {
cout<<a[i];
}
}
cout<<endl;
}
return 0;
}//we转化为you