POJ3981字符串替换

来源:互联网 发布:改变信仰 知乎 编辑:程序博客网 时间:2024/05/16 09:04
#include<stdio.h>int main(void){char ch1,ch2,ch3;while((ch1=getchar())!=EOF){if(ch1=='y'){if((ch2=getchar())=='o'){if((ch3=getchar())=='u'){printf("we");}else printf("yo%c",ch3);}else printf("y%c",ch2);}else putchar(ch1);}}

原创粉丝点击