View Code of Problem 3496

#include<iostream>
#include<cstring>
#include<algorithm>
#include<stdio.h>
using namespace std;
 
int main(){
	char a[10000];
	while(gets(a)){
	int x=strlen(a);
	for(int i=0;i<x; ){
		if(a[i]=='y'&&a[i+1]=='o'&&a[i+2]=='u'){
			cout<<"we";
			i=i+2;
		}else{
			cout<<a[i];
			i++;
		}
	}
	cout<<endl;
}
	return 0;
}

Double click to view unformatted code.


Back to problem 3496