一、Magic Squares
      A magic square of order is an arrangement of n×n numbers, usually distinct integers, in a square, such that the numbers in all rows, all columns, and both diagonals sum to the same constant (see Wikipedia: Magic Square).
Lab1

You are to write a Java program (MagicSquare.java) for checking the row/column/diagonal values of a matrix and then judging whether it is a magic square.

判断是否幻方结构:

Lab1

Lab1

Lab1
Lab1

相关文章: