View Code of Problem 3496

#include <stdio.h>
#include <string.h>
#include<math.h>

int main(){
	char s[10000];
	while(gets(s)){
		int k,x;
		for(int i=0;i<strlen(s);i++){
			if(s[i]=='y'&&s[i+1]=='o'&&s[i+2]=='u'){
				k=i+2;
				s[i]='w';
				s[i+1]='e';
				for(x=k;x<strlen(s)-1;x++){
					s[x]=s[x+1];
				}
				s[x]='\0';
			}
		}
		puts(s);
	}
	
	return 0;
}

Double click to view unformatted code.


Back to problem 3496