码迷,mamicode.com
首页 > 其他好文 > 详细

TEX Quotes UVA - 272【字符串】

时间:2017-12-13 17:23:18      阅读:142      评论:0      收藏:0      [点我收藏+]

标签:include   problem   names   代码   字符   log   print   using   else   

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);
        }
    }
}

  

TEX Quotes UVA - 272【字符串】

标签:include   problem   names   代码   字符   log   print   using   else   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!