View Code of Problem 3496

//#include<bits/stdc++.h>      
//using namespace std;
#include<stdio.h>
int main(){
	char a[1000];
	int k;
	while(gets(a)){
		for(int i = 0;a[i]!='\0';i+=3){
			if(a[i]=='y'&&a[i+1]=='o'&&a[i+2]=='u'){
				a[i] = 'w';
				a[i+1] = 'e';
				for( k = i+2;a[k]!='\0';k++)a[k] = a[k+1];				 
			}
		}
		printf("%s\n",a); 
//		memset(a,0,sizeof(a));
	}
	
	return 0;
}

Double click to view unformatted code.


Back to problem 3496