I don't how to explain the question that was asked, I think it was something like write a program using arrays that would subtract eash interger in the array? anyway something like this

array 1/2/5/10/17 then the next array would look like this 2/5/7 then keep subtracting until it reaches zero

heres what I have so far don't give me the answer but any hints would be helpful thanks

Int[] seqDiff(int[] a){
int[] temp= new int[a.length -1];
for(int i = 0; i<temp.length; i++)
tmp[i] =a[i+1]-a[i]
Return temp;
}
I don't know how to make it stop