View Code of Problem 3496

#include <stdio.h>
#include <string.h>
using namespace std;
int main(){
	char c[1010];
	while(gets(c) != NULL ){
		for( int i=0; i<strlen(c); i++ ){
			if( c[i] == 'y' && c[i+1] == 'o' && c[i+2] == 'u'){
				printf("we");
				i = i+2;
			}else{
				printf("%c", c[i]);
			}
		}
	}

	return 0;
	
}

Double click to view unformatted code.


Back to problem 3496