Skip to content

Instantly share code, notes, and snippets.

@pinglunliao
Last active November 5, 2019 08:52
Show Gist options
  • Save pinglunliao/749f94269bb15740b3e8 to your computer and use it in GitHub Desktop.
Save pinglunliao/749f94269bb15740b3e8 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main(void)
{
char ch;
int count = 1;
while( cin.get(ch) )
{
if(ch == '"')
{
if( count == 1 )
cout << "``";
else if( count == 0 )
cout << "''";
count = 1 - count;
continue;
}
cout << ch;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment