kernelthread.com

REXX

The Towers of Hanoi as a REXX program.

/* * The Towers Of Hanoi * REXX * Copyright (C) 1998 Amit Singh. All Rights Reserved. * http://hanoi.kernelthread.com * * Tested under a Linux REXX implementation (0.00alpha) */ hanoi(3, 3, 1, 2) hanoi: procedure parse arg n, t, f, u if n>0 then do hanoi(n-1, u, f, t) say "move %d --> %d" hanoi(n-1, t, u, f) end else return 0

Download

hanoi.rexx