Magic squares of odd order: Difference between revisions

+R
m (→‎{{header|REXX}}: used a template for the output section.)
(+R)
Line 3,527:
21 23 32 41 43 3 12
22 31 40 49 2 11 20</pre>
 
=={{header|R}}==
 
See [http://rosettacode.org/wiki/Magic_squares_of_doubly_even_order#R here] for the solution for all three cases.
 
'''Example'''
 
<pre>> magic(5)
[,1] [,2] [,3] [,4] [,5]
[1,] 17 24 1 8 15
[2,] 23 5 7 14 16
[3,] 4 6 13 20 22
[4,] 10 12 19 21 3
[5,] 11 18 25 2 9</pre>
 
=={{header|Racket}}==
1,336

edits