Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 years ago
465 B
4
Indexable
Never
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

int main() {
    char symbol;
    int len = 0, cnt = 0;
    while (scanf("%c", &symbol) != EOF) {
        if (symbol != ' ' && symbol != ',' && symbol != '\n' && symbol != '\t' && symbol != '\0' && isalpha(symbol) != 0)
            len += 1;
        else {
            if (len >= 3)
                cnt += 1;
            len = 0;
        }
    }
    printf("%d\n", cnt);
    return 0;
}