int sin = 123456789; 
for (int i = 0; i < 9; i ++) {
    printf("sin: %d \n", sin); 
    int digit = (sin % (10^(1+i)));
    printf("digit: %d \n", digit); 
    sin -= digit * 10^i; 
    sin_array[8 - i] = digit // dividing by 10 drops the decimals
    printf("array: %d \n", sin_array[8 - i]); 
}