View Code of Problem 3496

#include<stdio.h>
#include <math.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#define Max 100
int main()
{
	char a[1000];
	while(gets(a))
	{
		int len=strlen(a);
		for(int i=0;i<len-2;i++)
		{
			if(a[i]=='y'&&a[i+1]=='o'&&a[i+2]=='u')
			{
				a[i]='w';
				a[i+1]='e';
				a[i+2]='#';
			}
		}
		for(int j=0;j<len;j++)
		{
			if(a[j]!='#')
			printf("%c",a[j]);
		}
		printf("\n");
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3496