You are viewing a single comment's thread. Return to all comments →
**Mine Solution **
#include<ctype.h> char S[1000]; int a[] = {0,0,0,0,0,0,0,0,0,0}; scanf("%s",&S); for(int i=0; i<strlen(S); i++){ if(isdigit(S[i])){ a[S[i]-'0'] += 1; } } for(int 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 →
**Mine Solution **