UVa272 TEX Quotes

#include <stdio.h>

int main()
{
    int c, q = 1;
    while ((c = getchar()) != EOF) {
        if (c == '"') { printf(q ? "``" : "''"); q ^= 1; }
        else putchar(c);
    }
    return 0;
}

posted on 2015-06-20 11:51  danny1221  阅读(237)  评论(0编辑  收藏  举报

导航