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