• + 0 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]); }