Guest User

Untitled

a guest
Feb 15th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int quote_counter;
  6. char c;
  7.  
  8. quote_counter = 0;
  9.  
  10. while (c != EOF)
  11. {
  12. c = getchar();
  13. if (c == '"') {
  14. if (quote_counter % 2 == 0) {
  15. putchar('\`');
  16. putchar('\`');
  17. }
  18. else {
  19. putchar('\'');
  20. putchar('\'');
  21. }
  22. quote_counter++;
  23. }
  24. else {
  25. putchar(c);
  26. }
  27. }
  28.  
  29. return 0;
  30. }
Add Comment
Please, Sign In to add comment