Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define TRUE 1
- #define FALSE 0
- int main() {
- char c;
- int t;
- t = FALSE;
- while ((c = getchar()) != EOF) {
- if(c == ' ' || c == '\t'){
- if( t == TRUE) printf("\n");
- t=FALSE;
- }
- else if (c != '\n'){
- t = TRUE;
- putchar(c);
- }
- else { if(t != FALSE) {
- printf("\n");
- t = FALSE;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement