View Code of Problem 107

# include<stdio.h>

int main(){
	int m,n;
	while(scanf("%d %d",&m,&n)!=EOF){
		int i,j,k,a[10]={0};
		for(i=m;i<=n;i++){
			j=i;
			while(j!=0){
				k=j%10;
				a[k]++;
				j/=10;
			}
		}
		for(i=0;i<10;i++)
			printf("%d ",a[i]); 
		printf("\n");
	}
	
	return 0;
	 
}

Double click to view unformatted code.


Back to problem 107