PROGRAM HANOI(INPUT, OUTPUT);VAR RINGS,    DEST,    HOME : INTEGER;PROCEDURE TOWER        (RING, HOME, DEST : INTEGER);  VAR OTHER :INTEGER;  BEGIN;  OTHER := 1;  WHILE (OTHER = DEST) OR                  (OTHER = HOME) DO     OTHER := OTHER + 1;  IF RING = 1 THEN    WRITELN('MOVE ',RING,' FROM ',                   HOME,' TO ',DEST)  ELSE   BEGIN;    TOWER(RING-1, HOME, OTHER);    WRITELN('MOVE ',RING,' FROM ',                   HOME,' TO ',DEST);    TOWER(RING-1, OTHER, DEST);   END END;BEGIN;   WRITE('HOW MANY RINGS SHOULD THE TOWER GURU MOVE? ');   READ(RINGS);   WRITE('WHICH OF THE THREE RINGS DOES THE STACK START ON? ');   READ(HOME);   WRITE('WHICH RING SHOULD I MOVE THE STACK FOR? ');   READ(DEST);   WRITE(CHR(125));     TOWER(RINGS,HOME,DEST)END.    ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,