Magic square by yvl

1.upto(n=gets.to_i){|j|puts (1..n).map{|i|"%3d".%1+(i+n/2+y=j-n-i*2)%n+y%n*n}*" "}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top