diff options
Diffstat (limited to 'counter.c')
-rw-r--r-- | counter.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/counter.c b/counter.c deleted file mode 100644 index a1b9927..0000000 --- a/counter.c +++ /dev/null @@ -1,29 +0,0 @@ -#include<stdio.h> - -/* - * Count characters in input; 1st version - */ -//main() { -// long nc; -// -// nc = 0; -// -// while (getchar() != EOF) -// ++nc; -// -// -// printf("%ld\n", nc); -//} - -/* - * Count characters in input; 2nd version - */ -main() { - long nc; - - - for (nc = 0; getchar() != EOF; ++nc) - ; - - printf("%ld\n", nc); -} |