Untitled

Anonymous
c_cpp
11/30/2022 10:25 AM
620 B
19
Indexable
#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;
}
Editor is loading...