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