Quote (AbDuCt @ Jun 14 2012 12:19pm)
i would of thought you would have been posting here enough to know to post some code and where you are stuck...
I actually editted it out to see how you guys would tackle it xD
Code
public static int ArraySum(int[][] A, int a, int b)
{
System.out.println(a + "" + b);
if(a == A.length-1 & b == A.length-1)
return A[a][b];
if(a <= b & b != A.length)
return A[a][b] + ArraySum(A, a, b+1);
if(b == A.length-1)
return ArraySum(A, a+1, 0);
return 1;
}
}
I can't find the right statement to sum the second colum, third column etc till the end.
Maybe I'm looking at it from a bad angle?
/e still trying to find a way to sum the rest of the array,.
This post was edited by IsraeliSoldier on Jun 14 2012 11:40am