You are viewing a single comment's thread. Return to all comments →
int main() {
int count[10] = {0}; int i; char *num = malloc(1000 * sizeof(char)); fgets(num, 1000, stdin); while (*num != '\0'){ if (isalnum(*num)) count[*num - '0']++; *num++; } for (i = 0; i < 10; i++) printf("%d ", count[i]); return 0;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Digit Frequency
You are viewing a single comment's thread. Return to all comments →
int main() {
}