This program checks whether a given (n x n) matrix of integers values forms a Magic Square. It also generates a Magic Square for a given n, assuming n is an odd number.
An (n x n) matrix of integers filled with the values 1, 2, 3, ..., n2 is a magic square if the sum of all of the elements in each row, in each column, and along the two diagonals is the same.