版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/leekerian/article/details/83826518
紫薯训练-1
字符串转换
#include<iostream>
#include <cstdio>
using namespace std;
int main()
{
char c;
int cont=0;
while(scanf("%c",&c)!=EOF)
{
if(c=='"')
{
cont=(cont+1)%2;
if(cont==1)
{
printf("``");
}
else if(cont==0)
{
printf("''");
}
}
else
printf("%c",c);
}
return 0;
}