1. sunqiang
  2. tcpl

Commits

sunqiang  committed 4eac487

mini update of ch1.5.4 ex1.12

  • Participants
  • Parent commits cfa4df6
  • Branches default

Comments (0)

Files changed (1)

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

View file
     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);