From 39c0cbcc70aff47e17107826aa76cb525c83b122 Mon Sep 17 00:00:00 2001 From: Adam Carpenter Date: Tue, 9 Jul 2019 16:00:48 -0400 Subject: ch2 --- counter.c | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 counter.c (limited to 'counter.c') 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 - -/* - * 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); -} -- cgit v1.2.3