#include<bits/stdc++.h> 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; } } /* F:\temp\21521967.715477\Main.cc:2:24: error: bits/stdc++.h: No such file or directory F:\temp\21521967.715477\Main.cc: In function 'int main()': F:\temp\21521967.715477\Main.cc:6: error: 'string' was not declared in this scope F:\temp\21521967.715477\Main.cc:6: error: expected ';' before 's' F:\temp\21521967.715477\Main.cc:7: error: 'cin' was not declared in this scope F:\temp\21521967.715477\Main.cc:7: error: 's' was not declared in this scope F:\temp\21521967.715477\Main.cc:7: error: 'getline' was not declared in this scope F:\temp\21521967.715477\Main.cc:15: error: 'cout' was not declared in this scope F:\temp\21521967.715477\Main.cc:15: error: 'endl' was not declared in this scope */ |
Double click to view unformatted code.