View Code of Problem 3496

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

Double click to view unformatted code.


Back to problem 3496