Sunday, February 27, 2011

272 - TEX Quotes


#include<stdio.h>
#include<stdlib.h>
int main()
{
    register char ch;
    register int p=0;
   // freopen("in.txt","r",stdin);
    while(scanf("%c",&ch)==1)
    {
        if(ch==34)
        {
            ch=(p)?39:96;
            p=(p)?0:1;
            printf("%c%c",ch,ch);
        }
        else
            printf("%c",ch);               
    }
    exit(0);
}

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.