Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. #define IN 1
  4. #define OUT 0
  5.  
  6. int main() {
  7.  
  8. int c, state;
  9. state = IN;
  10. while ((c = getchar()) != EOF) {
  11. if ((c == ' ') || (c == '\t') || (c == '\n')) {
  12. state = OUT;
  13. while (state == OUT) {
  14. c = getchar();
  15. if ((c != ' ') && (c != '\t') && (c != '\n')) {
  16. printf("\n%c", c);
  17. state = IN;
  18. }
  19. }
  20. }
  21. else printf("%c", c);
  22. }
  23.  
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement