#defineNON-1;intmain()//print input one word per line{int c,state,laststate;
laststate = NON;
state = OUT;while((c =getchar())!=EOF){
laststate = state;//record last stateif(c ==' '|| c =='\n'|| c =='\t'){
state = OUT;if(laststate != state)//state from IN to OUT//end of a word{printf("\n");}}elseif(state == OUT)//if "c" is one of three previous chatacrters,state is OUT//otherwise it is IN{
state = IN;}if(state == IN){putchar(c);}}}