Last active
November 5, 2019 08:52
-
-
Save pinglunliao/749f94269bb15740b3e8 to your computer and use it in GitHub Desktop.
c007: 00272 - TeX Quotes FYI: https://yunlinsong.blogspot.com/2015/04/c007-00272-tex-quotes.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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