Advertisement
10rch

Untitled

Feb 28th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.24 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.  int c,p;
  6.  c=getchar();
  7.  while(c!=EOF){
  8.     if(c!=' ')
  9.     {
  10.         p=0;
  11.     }
  12.     if(c==' ')
  13.     {
  14.         p++;
  15.     }
  16.     if(p<=1){
  17.         putchar(c);
  18.     }
  19.     if(p==1){
  20.         printf("\n");
  21.     }
  22.     c=getchar();
  23.   }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement