1
0
mirror of https://github.com/krislamo/knrc.git synced 2025-10-07 10:59:29 +00:00

Character counting example v2

This commit is contained in:
2021-11-09 00:20:01 -05:00
parent 72093b7232
commit 3512ae49ab

View File

@@ -2,10 +2,9 @@
int main() int main()
{ {
long nc; double nc;
nc = 0; for (nc = 0; getchar() != EOF; ++nc)
while (getchar() != EOF) ;
++nc; printf("%.0f\n", nc);
printf("%ld\n", nc);
} }