Commits

sunqiang committed 4eac487

mini update of ch1.5.4 ex1.12

Comments (0)

Files changed (1)

ch01/05/12.ex1.12/main.c

     while ((c = getchar()) != EOF) {
         if (c == ' ' || c == '\t' || c == '\n') {
             if (state == IN) {
+                state = OUT;
                 putchar('\n');
-            } else {
-                ;
             }
-            state = OUT;
         } else {
             state = IN;
             putchar(c);