From 39c0cbcc70aff47e17107826aa76cb525c83b122 Mon Sep 17 00:00:00 2001 From: Adam Carpenter Date: Tue, 9 Jul 2019 16:00:48 -0400 Subject: ch2 --- whitespace_counter.c | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 whitespace_counter.c (limited to 'whitespace_counter.c') diff --git a/whitespace_counter.c b/whitespace_counter.c deleted file mode 100644 index ea441e2..0000000 --- a/whitespace_counter.c +++ /dev/null @@ -1,22 +0,0 @@ -#include - -/* - * Count whitespace in input - */ -main() { - int c, n_whitespace; - - n_whitespace = 0; - - while ((c = getchar()) != EOF) { - if (c == '\n') - ++n_whitespace; - if (c == '\t') - ++n_whitespace; - if (c == ' ') - ++n_whitespace; - } - - - printf("%d\n", n_whitespace); -} -- cgit v1.2.3