#include "stdio.h" #include "string.h" #include "ctype.h" #include "math.h" int main() { char a[1000]; while(gets(a)) { int len=strlen(a); for(int i=0;i<len-2;i++) { if(a[i]=='y'&&a[i+1]=='o'&&a[i+2]=='u') { a[i]='w'; a[i+1]='e'; a[i+2]='#'; } } for(int j=0;j<len;j++) { if(a[j]!='#') printf("%c",a[j]); } printf("\n"); } return 0; } |
Double click to view unformatted code.