You are viewing a single comment's thread. Return to all comments →
int main() {
char *s;int i,a[10]={0}; s=malloc(10000); scanf("%[^\n]",s); for(i=0;i<strlen(s);i++) { if((int) *(s+i) >47 && (int) *(s+i)<58) { a[((int) *(s+i))-48]++; } } for(i=0;i<10;i++) { printf("%d ",a[i]); }
}
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 →
include
include
include
int main() {
}