TEX Quotes
Sample Input
"To be or not to be," quoth the Bard, "that
is the question".
The programming contestant replied: "I must disagree.
To `C' or not to `C', that is The Question!"
Sample Output
``To be or not to be,'' quoth the Bard, ``that
is the question''.
The programming contestant replied: ``I must disagree.
To `C' or not to `C', that is The Question!''
#include<cstdio>
#include<cstring>
int main(){
char c,q=1;
while((c=getchar())!=EOF){
if(c=='"'){
if(q==1)
printf("``");
else
printf("''");
q=!q;
}
else printf("%c",c);
}
}