summaryrefslogtreecommitdiff
path: root/whitespace_counter.c
diff options
context:
space:
mode:
Diffstat (limited to 'whitespace_counter.c')
-rw-r--r--whitespace_counter.c22
1 files changed, 0 insertions, 22 deletions
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<stdio.h>
-
-/*
- * 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);
-}