[REBOL] Re: Another coffee break problem?
From: joel:neely:fedex at: 11-Nov-2003 7:02
Gregg Irwin wrote:
> JN> The following 3-by-3 display is a simple magic square:
> JN> 0 8 4
> JN> 5 1 6
> JN> 7 3 2
> JN> because each row and each column sums to 12...
> No diagonals? I thought magic squares had to work on the diagonal as
> well? (not to be nit-picky or anything :)
To be equally picky ;-)
That's why I said "simple magic" square instead of "totally magic". I
was going to post a follow-up problem to refine the first program so
that it also checks diagonals.
Also, not all sources I've looked at insist on diagonal operations. One
interesting way to generalize the problem is to "magic" rectangles with
different height and width. In that case, the definition of "diagonal"
becomes more interesting...