View Code of Problem 3496

#include<stdio.h>
#include<string.h>
int main(){
	char a[1000];
	while(gets(a)!=NULL){
		int len = strlen(a);
		int i;
		char b[1000];
		int num = 0;
		for(i = 0;i < len; i++){
			if(a[i]=='y'&&a[i+1]=='o'&&a[i+2]=='u'){
				b[num++] = 'w';
				b[num++] = 'e';
				i+=2;
			}
			else
				b[num++] = a[i];
		}
		puts(b);
	}
}

Double click to view unformatted code.


Back to problem 3496