var hanoi = function(disc,src,aux,dst) {
if (disc > 0) {
hanoi(disc - 1,src,dst,aux);
write("Move disc " + disc + " from " + src + " to " + dst + "<br />");
hanoi(disc - 1,aux,src,dst);
}
};
hanoi(3,"src","aux","dst");
/*
hanoi(3,"src","aux","dst");
if (disc > 0) {
hanoi(2,'src','dst','aux');
if (disc > 0) {
hanoi(1,'src','aux','dst');
if (disc > 0) {
hanoi(0,'src','dst','aux');
END
write("Move disc " + 1 + " from " + src + " to " + dst + "<br />");