c_exercises/1-8.c

13 lines
190 B
C
Raw Normal View History

2022-11-05 17:51:56 -03:00
#include <stdio.h>
int main() {
int c, nb;
nb = 0;
while ((c=getchar()) != EOF){
if (c == '\t' || c == '\n' || c == ' '){
++nb;
}
}
printf("%d\n", nb);
return 0;
}