poj3981

简单题

View Code
   
     
#include < iostream >
#include
< cstdio >
#include
< cstdlib >
#include
< cstring >
using namespace std;

int main()
{
// freopen("t.txt", "r", stdin);
string st;
while (getline(cin, st))
{
int pos;
while ((pos = st.find( " you " )) != string ::npos)
{
st.erase(pos,
3 );
st.insert(pos,
" we " );
}
cout
<< st << endl;
}
return 0 ;
}

你可能感兴趣的:(poj)