uva 272 - TeX Quotes

来源:互联网 发布:作谱软件 编辑:程序博客网 时间:2024/05/17 02:37

水题……

#include<cstdio>int main(){    //freopen("in.txt","r",stdin);    char c;    bool q = true;    while(~scanf("%c",&c)){        if(c=='"'){            printf("%s",q?"``":"''");            q = !q;        }        else printf("%c",c);    }    return 0;}


 

0 0
原创粉丝点击