#include main() { char c; int n_alpha, n_space, n_digit, n_other, i; n_alpha = n_space = n_digit = n_other = 0; while ((c=getchar())!='\n') { if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z') n_alpha++; else if (c >= '0' && c <= '9') n_digit++; else if (c == ' ' || c == '\t') n_space++; else n_other++; } printf("Alpha:%d, Space:%d, Digit:%d, Other:%d\n", n_alpha, n_space, n_digit, n_other); return 0; }