-- -- The Towers Of Hanoi -- Ada -- Copyright (C) 1999 Amit Singh. All Rights Reserved. -- http://hanoi.kernelthread.com -- N: constant INTEGER := 3; procedure hanoi(n, from, to, using: in integer); begin if (n = 1) then put("move "); put(from); put(" --> "); put(to); new_line; else hanoi(n - 1, from, using, to); hanoi(1, from, to, using); hanoi(n - 1, using, to, from); end if; end hanoi; procedure main is begin hanoi(N, 1, 3, 2); end main;