View Code of Problem 3496

#include "stdio.h"
#include "string.h"
#include "ctype.h"
#include "math.h"
int main()
{
    int t,n,x,i,j,cnt,m,k;
    char a[100];
  	while(gets(a))
  	{
  		int len=strlen(a);
  		for(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(i=0;i<len;i++)
  		{
  			if(a[i]!='#')
  			  printf("%c",a[i]);
  		}
  		printf("\n");
  	}
    return 0;
}

Double click to view unformatted code.


Back to problem 3496