#include<stdlib.h> #include<stdio.h> #include<string.h> int main(){ char str[5000]; while((gets(str)!=NULL)){ int len = strlen(str); int i,flag=0; for(i=0; i<len-2;i++){ if(str[i]=='y' && str[i+1]=='o' && str[i+2]=='u'){ if(i==len-3) flag=1; printf("we"); i = i+2; }else{ printf("%c",str[i]); } } if(flag!=1) printf("%c%c",str[len-2],str[len-1]); printf("\n"); } } |
Double click to view unformatted code.