Q: How do I divide 2 int arrays? Suppose you are in base 10.
You want to divide int[] a = new int[] {9, 9};
by int[] b = new int[] {1, 0, 1};
Every element in both arrays contain a single digit.
On paper it would look like 99/101, which would give you a repeating decimal.
How do I do this without converting/combining either array into an int?

A: If the array is long, you can use BigInteger. 
First of all, convert the array into a string and construct the BigInteger using the string. 
Then, do arithmetic using two BigInteger. 
Here is the code to convert the array into a BigInteger. 
public BigInteger convert2BigInteger(int[] arr) {
    StringBuilder sb = new StringBuilder();
    for(int v : arr) {
        sb.append(v);
    }
    return new BigInteger(sb.toString());
}


A:    public double divideArrayContent(int[] a, int[] b) {
       int aT = 0;
       int bT = 0;
       for(int i = 0; i < a.length; i++) {
           aT += a[a.length - (i + 1)] * 10 ^ i;
       }
       for(int i = 0; i < b.length; i++) {
           bT += b[b.length - (i + 1)] * 10 ^ i;
       }
       return aT / bT;
   }

This should work, but I have not tested it.

A: int []a = {1,2,3,4,5,6};
int c = 1;
int result = 0;
for(int i = a.length-1; i >= 0; i--){
    if(i == a.length-1){
        result += a[i]; 
    }else{
        c = c * 10;
        result += a[i] * c;
    }
}

