Binary-coded decimal is a method to represent decimal numbers encoded into binary. It uses each group of 4 bits (which can normally represent numbers from 0 to 15) to represent one decimal digit (of values 0 to 9).
Write a function that converts a number into its BCD representation. You are guaranteed that the input number will be between 0 and 99999999.
Write your solution here