Code java:

for(row = 0 ; row < size ;row++){ result = 0; for (col = 0 ; col < size ; col++) result = matrix[row][col] +result; magic = result; sumRows[row]= result; if (sumRows[row] == magic){ System.out.println("Row " +count +" = "+ result + " OK");} else System.out.println("Row " +count +" = "+ result + " NOT OK"); count++; }

i have this code where i prompt the user to enter a number then that number will be the size of the array i.e if the user enters 3 the size of the array will be 3x3

then the user fills each location with ints.. then computes the sum of rows and columns

so i have the top code i need to make the 1st sum to be the magic number so that the magic number will be compared to the other sums to determine if the square is a magic square.. help