Anonymous user
Magic squares of doubly even order: Difference between revisions
Magic squares of doubly even order (view source)
Revision as of 08:34, 18 December 2016
, 7 years ago→{{header|REXX}}: changed wording in the REXX section header.
m (→{{header|REXX}}: optimized the MAX# subroutine.) |
m (→{{header|REXX}}: changed wording in the REXX section header.) |
||
Line 1,023:
<!-- I couldn't figure out the other code's bit shifting and bit ANDing, so I wrote my own algorithm. -->
"Marked" numbers
<br>swapped (and thusly, stay in place in the magic square).
<lang rexx>/*REXX program constructs a magic square of doubly even sides (a size divisible by 4).*/
n=8; s=n%4; L=n%2-s+1; w=length(n**2) /*size; small sq; low middle; # width*/
|