Magic square by youz

(= n(read)m[mod _ n]l(n-of n(n-of n 0))x(trunc:/ n 2)y 0)(for i 1(* n n)(= l.y.x i j(min m.i 1)x(m:+ x j)y(m:+ y j 1)))(on r l(apply prs(map[cut(+"   "_)(len:num _)]r))(prn))

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

download

return to the top page