###
A magic square for order of an odd number using c++

17-Sep-2017
| Admin

A Magic Square of order N is an arrangement of N x N numbers, usually distinct integers, in a square, such that the n numbers in all rows, all columns, and both diagonals sum to the same constant. A magic square contains the integers from 1 to N x N. The constant sum in every row, column and diagonal is called the magic constant or magic sum, M. The Magic Constant of a normal magic square depends only on n and has the following value: M = N(N^2+1)/2; Here we demonstrate a program to draw magic-square for order of an odd number. You can change the value of N in the code to print for a different number.