mirror of
https://github.com/krislamo/knrc.git
synced 2025-01-05 19:10:36 +00:00
Character counting example v2
This commit is contained in:
parent
72093b7232
commit
3512ae49ab
@ -2,10 +2,9 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
long nc;
|
||||
double nc;
|
||||
|
||||
nc = 0;
|
||||
while (getchar() != EOF)
|
||||
++nc;
|
||||
printf("%ld\n", nc);
|
||||
for (nc = 0; getchar() != EOF; ++nc)
|
||||
;
|
||||
printf("%.0f\n", nc);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user