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