Write a program that prints its input one word per line.
#include <stdio.h> #define State '\n' void main() { int Juge=0;/*only one space*/ int c=0; while((c=getchar())!=EOF) { if(c==' '||c=='\t'||c=='\b') { if(Juge==1) { putchar(State); Juge=0; } } else { putchar(c); Juge=1; } } }
I Love U
I
Love
U