All pastes #296554 Raw Edit

Something

public text v1 · immutable
#296554 ·published 2006-12-30 09:29 UTC
rendered paste body

#include <stdio.h>
#define IN 1 /* Inside a word */
#define OUT 0 /* Outside a word */

main()
{
        char c;
        int state;
        state = OUT;
        while ((c = getchar()) !=EOF) {
                if (c == '\n' || c == '\t' || c == ' ')
                state = OUT;
                else if (state == OUT) {
                        state = IN;
                        printf("%c\n", c);
                        }
                }
        return 0;
}