View Code of Problem 3496

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

Double click to view unformatted code.


Back to problem 3496