The Magic Square Calculator



This program demonstrates the use of Perl programming to manipulate data in arrays to solve the problem of the Magic Square. Choose a matrix size (i.e. an ODD number greater than one) - if you keep it under about 11 the results will display better. Submit to see the results which display all the numbers in the grid organized so that the sum of numbers in every row, column and diagonal equals the same value.

Enter matrix size (Any ODD number greater than 1)      and click submit



Return to Resources Home Page