C Program to Check whether Matrix is Magic Square or Not ?

C Program to Check whether entered matrix is magic square or not ?

What is Magic Square :

  1. A magic square is a simple mathematical game developed during the 1500.
  2. Square is divided into equal number of rows and columns.
  3. Start filling each square with the number from 1 to num ( where num = No of Rows X No of Columns )
  4. You can only use a number once.
  5. Fill each square so that the sum of each row is the same as the sum of each column.
  6. In the example shown here, the sum of each row is 15, and the sum of each column is also 15.
  7. In this Example : The numbers from 1 through 9 is used only once. This is called a magic square.

Output :

Note :