View Code of Problem 3496

#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
//#include<algorithm>
//#include <bits/stdc++.h>

int main() {
	char str[1001];
	while(gets(str)!=NULL) {
		for(int i=0; i<strlen(str); i++) {
			if(str[i]=='y' && str[i+1]=='o'&&str[i+2]=='u') {
				printf("we");
				i=i+2;
			}else{
			printf("%c",str[i]);
			}
		}
		printf("\n");
	}

}

Double click to view unformatted code.


Back to problem 3496