UVa 272 - TEX Quotes

#include<stdio.h>
#include<string.h>
int main()
{
    char str[100000];
    long long i,len,flag=0;
    while(gets(str))
    {
        len=strlen(str);
        for(i=0; i<len; i++)
        {
            if(str[i]=='"')
            {
                flag++;
                if(flag%2==1)
                    printf("``");
                else
                    printf("''");
            }
            else
                printf("%c",str[i]);
        }
        printf("\n");
    }
    return 0;
}
Share on Google Plus

About Unknown

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 মন্তব্য(গুলি):

একটি মন্তব্য পোস্ট করুন