Advertisement
Guest User

2-1

a guest
Mar 27th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2. int
  3.     main()
  4. { char c;
  5.  int t;
  6.  t = 0;
  7.  while ((c=getchar()) !=EOF) {
  8.      if (c==' '||c=='\t') { if (t==1) printf ("\n");
  9.      t=0; }
  10.      else if(c!='\n') {t=1;
  11.      putchar(c);
  12.      }
  13.      else {
  14.          if(t!=0) {printf ("\n");
  15.      t=0; }
  16.      }
  17.  }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement