Created
May 28, 2019 03:28
-
-
Save jongha/0a659b008f8579368b40d326ec6eb07f to your computer and use it in GitHub Desktop.
UVa 272 - TEX Quotes, https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=4&page=show_problem&problem=208
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 <stdio.h> | |
#include <stdlib.h> | |
#include <vector> | |
#include <list> | |
#include <algorithm> | |
#include <string.h> | |
#include <string> | |
#include <queue> | |
#include <stack> | |
#include <math.h> | |
int main(void) { | |
bool f = false; | |
char c; | |
while(true) { | |
int ret = scanf("%c", &c); | |
if(ret == EOF) break; | |
if(c == '"') { | |
if(!f) printf("``"); | |
else printf("''"); | |
f = !f; | |
}else printf("%c", c); | |
} | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment