#include<stdio.h>
int main(void)
{
int a[10] = {0};
int digit, n;
printf("PLease enter a number:");
scanf_s("%d", &n);
while (n>0)
{
digit = n % 10;
a[digit]++;
n /= 10;
}
printf("Digit:\t\t");
for (int i = 0; i < 9; i++)
{
printf("%d ", i);
}
printf("9\n");
printf("Occurrences: ");
for (int i = 0; i < 10; i++)
{
if (a[i]>0)
{
printf("%d ", a[i]);
}
else
{
printf("0 ");
}
}
return 0;
}