You are viewing a single comment's thread. Return to all comments →
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */ int a[10]={0}; char str[1000]; fgets(str,1000,stdin); for(int i=0;str[i];i++) { if(str[i]>='0'&&str[i]<='9') a[(str[i]-'0')]+=1; } for(int i=0;i<10;i++) { printf("%d ",a[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() {
}