Advertisement
lnsee96

Untitled

Aug 2nd, 2016
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. /*Write a program to copy its input to its output, replacing each string of one or more blanks by a single blank*/
  4.  
  5. main()
  6. {
  7.  
  8.     int c;
  9.     while ((c=getchar())!=EOF)
  10.     {
  11.         putchar(c);
  12.         while (c==' ')
  13.         {
  14.             c=getchar();
  15.             if (c!=' ')
  16.                 putchar(c);
  17.         }
  18.  
  19.     }
  20.  
  21.  
  22. }
  23.  
  24. //FINNNNNNAAAAALLLLLLYYYYYYYYYYYY :')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement