Displays/counts 4x4 magic squares, counts 5x5 magic squares. Adjusted
(mainly changed C++ comments, formatted 4x4 output) source included.

Original C source code: https://www.netstaff.co.jp/msq/msqe.htm

To compile: ICC MSQ4.C
            ICC /B"/ST:131072" MSQ5.C


MSQ4.EXE: 4x4 magic squares

MSQ5.EXE: 5x5 magic squares. Use e.g. the arguments "-q 1 1" to waste
less CPU cycles. Spoiler, unverified: the number of all magic squares
(with: -a 1 13) should be 275,305,224. Comments by its author, please
note the considerable time it'll take to complete (6x6: 220,500 years
is a 3GHz Pentium 4-estimation). So perhaps only try the 4x4-one, and
believe the 5x5-count without actually checking it:

--- 8X --- 8X ---

The total of 5x5 magic squares increases in number to 275,305,224 at a
stretch. Since it is a serious number, it takes time considerably also
with the latest personal computer.

Then, although 4 numbers except the center on a diagonal line have 12
kinds of order in a line, it is enabled to calculate 1/4 of the total
using a rule of what 12 kinds are made of 4 times of 3 basic orders.

Even if counting quarter of the total, it requires time too much.
Then, the above programs are enabled to count the total for each
number of the center of 5x5 grid.
