int populate_array(int sin, int *sin_array)
{
    // If a number is not 9 digits, performing integer division
    // will either yield 0 (<9 digits) or a number > 10 (>9 digits)
    if (sin / 100000000 < 1 || sin / 100000000 > 9)
    {
        return 1;
    }
    // Populate the array in reverse
    for (int i = 8; i > -1; i--)
    {
        sin_array[i] = sin % 10;
        sin = sin / 10;
    }
    return 0;
}