View Code of Problem 3496

#include <iostream>

using namespace std;

int main()
{
    string str;
    while(getline(cin , str)){
    for(int i = 0; i < str.size(); i++){
        if(str[i] == 'y' &&str[i+1] == 'o' &&str[i+2] == 'u'){
            cout << "we";
            i = i + 2;
        }
        else
            cout << str[i];
    }
    cout << endl;
    }
}

Double click to view unformatted code.


Back to problem 3496