View Code of Problem 3496

#include<stdio.h>
#include<string.h>
int main()
{
    char s[1000];
    int i;
    while(gets(s)!=NULL)
    {
        for(i=0;i<strlen(s)-2;i++)
        {
            if(s[i]=='y'&&s[i+1]=='o'&&s[i+2]=='u')
            {
                s[i]='w';
                s[i+1]='e';
                s[i+2]='*';
            }
        }
        for(i=0;i<strlen(s);i++)
        {
            if(s[i]=='*')
                continue;;
            printf("%c",s[i]);
        }
        printf("\n");
    }
}

Double click to view unformatted code.


Back to problem 3496