Here is what the instructions tell me to do:
public static int[][] horizontalSums(int[][] a, int sumToFind)
This method will create a new output array called b that has the same dimensions as a. For
each a[i][j], where i and j are valid indices in a, if a[i][j] is part of a horizontal sum in a that
equals sumToFind, then b[i][j] = a[i][j]; otherwise, b[i][j] = 0. The method should return b.
I'm a little confused on how I should approach this problem. Any suggestions on how to approach this would be appreciated. I'm guessing I'll need three loops (two to run through the array, then one to switch everything) but not sure how I should structure them.
This post was edited by ice060788 on Dec 7 2014 11:38am