Trying to write a method which returns the center of the MxN matrix and if the center does not exist the method should return the index of the square closest to the center w