Skip to content

Commit 4544b06

Browse files
committed
Tweaks to count.c
- Legacy-Id: 13537
1 parent 26f07f0 commit 4544b06

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

bin/count.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ int main( void )
1313
c = fgetc(stdin);
1414
while(c != EOF)
1515
{
16-
if (c=='.' || c=='E' || c=='F') count++;
16+
if (c=='.' || c=='E' || c=='F' || c=='s') count++; else count=0;
1717
fputc(c, stdout);
1818
fflush(stdout);
19-
if ( count % 76 == 0) {
19+
if (count && count % 76 == 0) {
2020
fprintf(stderr, "%4d", count);
2121
fflush(stderr);
2222
}

0 commit comments

Comments
 (0)