Skip to content

Commit

Permalink
[Alan] Update hanoi.alan to match hanoi.grc (#32)
Browse files Browse the repository at this point in the history
Signed-off-by: Stavros Avramidis <[email protected]>
  • Loading branch information
purpl3F0x authored Aug 27, 2024
1 parent 72949dc commit 44a9cc5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions alan/programs/hanoi.alan
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ solve () : proc

move (source : reference byte [], target : reference byte[]) : proc
{
writeString("Moving from ");
writeString("Move from ");
writeString(source);
writeString(" to ");
writeString(target);
Expand All @@ -23,7 +23,8 @@ solve () : proc
NumberOfRings : int;

{ -- solve
writeString("Rings: ");
writeString("Please, give me the number of rings: ");
NumberOfRings = readInteger();
writeString("\nHere is the solution:\n\n");
hanoi(NumberOfRings, "left", "right", "middle");
} -- solve

0 comments on commit 44a9cc5

Please sign in to comment.