Task

Solve the   Towers of Hanoi   problem with recursion.




PROC move(n, from, to, via)
  IF n > 0
    move(n-1, from, via, to)
    WriteF('Move disk from pole \d to pole \d\n', from, to)
    move(n-1, via, to, from)
  ENDIF
ENDPROC
 
PROC main()
  move(4, 1,2,3)
ENDPROC