fork download
  1. #include<stdio.h>
  2. #include<string.h>
  3.  
  4. int main()
  5. {
  6. char s[1001],i;
  7. int f,j;
  8. scanf("%s",&s);
  9. for(i=48;i<58;i++)
  10. {
  11. f=0;
  12. for(j=0;j<strlen(s);j++)
  13. {
  14. if(s[j]==i)
  15. {
  16. f++;
  17. }
  18. }
  19. printf("%d ",f);
  20. }
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 5536KB
stdin
a11472o5t6
stdout
0 2 1 0 1 1 1 1 0 0