Skip to content

Commit 92be0b8

Browse files
authored
Merge pull request #42 from DeadRobotDev/patch-1
Fix 1-11: Count newline as the end of a word
2 parents a3682c0 + 3444da7 commit 92be0b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

chapter_1/exercise_1_11/word_count_test.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ int main(void)
2323
{
2424
++nl;
2525
}
26-
else if (c == ' ' || c == '\n' || c == '\t')
26+
27+
if (c == ' ' || c == '\n' || c == '\t')
2728
{
2829
state = OUT;
2930
}

0 commit comments

Comments
 (0)