View Code of Problem 107

#include <stdio.h>
int main(){
  int m,i,n,b,c;
  int a[10]={0};
  while (scanf("%d %d",&m,&n)!= EOF){
	  int a[10]={0};
    for(i=m;i<=n;i++){
      b=i;
      while (b>0){
        c=b%10;
        a[c]++;
        b=b/10;
      
      
      
      }
    
    
    }
    for(i=0;i<9;i++)
      printf("%d ",a[i]);
	printf("%d\n",a[9]);

    
  
  
  
  }



return 0;
}

Double click to view unformatted code.


Back to problem 107