You are viewing a single comment's thread. Return to all comments →
int main() {
char *s; s = malloc(1024 * sizeof(char)); scanf("%[^\n]", s); s = realloc(s, strlen(s) + 1); char* pos=s; int c,i; for(i=0;i<=9;i++){ char j=i+48; for(c=0;*s;s++){ if((*s)==j) c++; } printf("%d ",c); s=pos; } 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() {
}