例3-1

                                     

#include <iostream>
#include<cstring>
#include<string>
#include<cstdio>
using namespace std;
int main()
{
    char c;
    int temp=1;
    while((c=getchar())!=EOF){ //getchar()妙用
        if(c=='"'){
            printf("%s",temp?"``":"''");
            temp=!temp;
        }
        else printf("%c",c);
    }
    return 0;
}
发布了97 篇原创文章 · 获赞 3 · 访问量 9435

猜你喜欢

转载自blog.csdn.net/foolishpichao/article/details/100054545
3-1
今日推荐