UVA - 272 TEX Quotes

Description

#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main()
{
    char c;
    int q=1;
    while((c=getchar())!=EOF)
    {
        if(c == '"')
        {
            printf(q ? "``":"''");
            q = !q;
        }
        else
            printf("%c",c);
    }
    return 0;
}
发布了399 篇原创文章 · 获赞 440 · 访问量 20万+

猜你喜欢

转载自blog.csdn.net/Aibiabcheng/article/details/105423737
TEX