View Code of Problem 3496

#include<stdio.h>
#include<string.h>
int main(){
	char a[1000];  //定义较大的数组,否则平台数组越界 
	while(gets(a)){
		int len=strlen(a);
		for(int i=0;i<len;i++){
			if(a[i]=='y'&&a[i+1]=='o'&&a[i+2]=='u'){
				printf("we");
				i=i+2;
			}
			else 
			    printf("%c",a[i]);
		} 
		 printf("\n");
	} 
} 

Double click to view unformatted code.


Back to problem 3496