#include<stdio.h>
main()
{
int ch,i,nwhite=0,nother=0;
int ndigit[10]={0};
printf("文字を入力してください\n");

while ( (ch=getchar()) !=EOF)
if (ch>='0' && ch<='9')
++ndigit[ch-'0'];
else if (ch==' ' || ch=='\n' || ch=='\t')
++nwhite;
else
++nother;

printf("数字の入力回数\n");

for(i=0;i<10;i++)
printf("%6d : %3d \n", i, ndigit[i]);
printf("空白 :%d \n", nwhite);
printf("その他 :%3d \n",nother);
}

これに加える感じでなんとか