UVA 272 TEX Quotes【字符串】

https://vjudge.net/problem/UVA-272

【分析】:标记一下。

【代码】:

#include <bits/stdc++.h>

using namespace std ;
int n,m;

int main()
{
    int f=1;  char c;
    while(scanf("%c",&c) != EOF)
    {
        if(c == '"')
        {
            printf("%s",f ? "``":"''");
            f=!f;
        }
        else
        {
            putchar(c);
        }
    }
}

  

原文地址:https://www.cnblogs.com/Roni-i/p/8032920.html