Magic square by msk

i,n;main(v){for(v=scanf("%d",&n)+n/2;i<n*n;printf("%3d%c",v+=(v<1)*n*n,i%n?32:10))v-=i++%n?(v%n!=1)*n-~n:n;}

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

download

return to the top page