I believe many people know the magic square.

Nine in the top, one in the bottom, three on the left, seven on the right, two and four on the shoulders, six and eight on the feet, and the sum of three numbers in horizontal, vertical, and diagonal directions is all 15.
Suddenly I thought, can we use batch processing to display the magic square? It's not just a simple echo.
We need to list the magic square pattern, with one number in each grid, and the numbers in the grids change every few seconds. For example:
[ Last edited by ccwan on 2007-1-14 at 01:31 AM ]
Nine in the top, one in the bottom, three on the left, seven on the right, two and four on the shoulders, six and eight on the feet, and the sum of three numbers in horizontal, vertical, and diagonal directions is all 15.
Suddenly I thought, can we use batch processing to display the magic square? It's not just a simple echo.
We need to list the magic square pattern, with one number in each grid, and the numbers in the grids change every few seconds. For example:
Magic square
4 9 2
3 5 7
8 1 6
Change to
2 9 4
7 5 3
6 1 8
Then change to
6 1 8
7 5 3
2 9 4
Then change to
8 1 6
3 5 7
4 9 2
Then change to
6 7 2
1 5 9
8 3 4
Then change to
8 3 4
1 5 9
6 7 2
And so on. The requirement is to list all possibilities. Remember it's not just listing, but showing one kind each time.
[ Last edited by ccwan on 2007-1-14 at 01:31 AM ]
三人行,必有吾师焉。 学然后知不足,教然后知困,然后能自强也。
