From a1dbca90e47c6348ee86bb01d979d8f0d9c59bdd Mon Sep 17 00:00:00 2001 From: celso Date: Sat, 5 Nov 2022 17:51:56 -0300 Subject: [PATCH] eigth exercise --- 1-8.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 1-8.c diff --git a/1-8.c b/1-8.c new file mode 100644 index 0000000..45c247b --- /dev/null +++ b/1-8.c @@ -0,0 +1,12 @@ +#include +int main() { + int c, nb; + nb = 0; + while ((c=getchar()) != EOF){ + if (c == '\t' || c == '\n' || c == ' '){ + ++nb; + } + } + printf("%d\n", nb); + return 0; +}