Tower of Hanoi by msk

g;f(n,i,j,k){n--&&f(n,k,j,i,putchar(g?j:i),f(n,i,k,j));}main(m){for(gets(&m);f(m%8,65,67,66),!g++;puts(""));}

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

download

return to the top page