#include <stdio.h>
#include <stdlib.h>
/*
 * Convert a 9 digit int to a 9 element int array.
 */
int populate_array(int sin, int *sin_array) {
    if ((sin / 1000000000 == 0) | (sin / 1000000000 >= 10)){
        return 1;     //sin num is not 9 digit
    }
    else{
        sin_array = malloc(sizeof(int) * 9);
        for (int i = 1; i < 10; i++){
            sin_array[i - 1] = sin % (10^i);
            sin = sin / 10;
        }
        return 0;
    }
}
Convert a 9 digit int to a 9 element int array.