Advertisement
NabilaShova

272-Tex Quotes

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