Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <ctype.h>
- void Read()
- {
- int c;
- int need_space = 0;
- while((c = getchar()) != EOF)
- {
- if(!isspace(c))
- {
- putchar(c);
- need_space = 1;
- }
- if(isspace(c))
- {
- if(need_space)
- {
- putchar(' ');
- need_space = 0;
- }
- }
- }
- }
- int main()
- {
- Read();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement