UVa 272-TEX Quotes



#include <stdio.h>
#include <stdlib.h>
 
int main(void) {
     char c;
     bool f = true;
     while((c = getchar())>0){
         if(c=='"'){
             if(f) printf("``");
             else printf("''");
             f=!f;
         }
         else putchar(c);
     }
        return 0;
}
Runtime: 0.015

Comments

Popular Posts