View Code of Problem 3496

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


int main(){
	char a[1000];
	int i;
	while(gets(a)!=NULL){
		for(i=0;i<strlen(a);i++){
			if(a[i]=='y'&&a[i+1]=='o'&&a[i+2]=='u'){
				printf("we");
				i+=2;
			}
			else
				printf("%c",a[i]);
		}
		printf("\n");
	}		
}

Double click to view unformatted code.


Back to problem 3496