Advertisement
Rakibul_Ahasan

Uva->272 - TEX Quotes

Oct 10th, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     char ch;
  7.  
  8.     long long cnt=0;
  9.     while(scanf("%c",&ch)!=EOF){
  10.         if(ch=='"'){
  11.             cnt++;
  12.             if(cnt%2==1)
  13.                 printf("``");
  14.             else printf("''");
  15.         }
  16.         else printf("%c",ch);
  17.     }
  18.  
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement