#include <stdbool.h>
#include <stdio.h>
int main() {
  int occurence_counter[2][10] = {{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}};
  long n;
  int digit;
  printf("Enter a number: ");
  scanf("%ld", &n);

  while (n > 0) {
    digit = n % 10;
    occurence_counter[1][digit] += 1;
    n /= 10;
  }

  printf("Digit:\t\t");
  for (int i = 0; i < 10; i++) {
    printf("%d ", occurence_counter[0][i]);
  }
  printf("\nOccurrences:\t");
  for (int i = 0; i < 10; i++) {
    printf("%d ", occurence_counter[1][i]);
  }
}
