Use any programming language you know of, to implement the Hanoi Tower. You must
ID: 3567434 • Letter: U
Question
Use any programming language you know of, to implement the Hanoi Tower. You must make the program to output the solution for 6 disks, showing how a disk is moved from a tower to another for every move. Your solution should look like the following, when the number of disks is 3:
OUTPUT SHOULD BE
[T1] 3 2 1
[T2]
[T3]
move disk 1 from [T1] to [T3]
[T1] 3 2
[T2]
[T3] 1
move disk 2 from [T1] to [T2]
[T1] 3
[T2] 2
[T3] 1
move disk 1 from [T3] to [T2]
[T1] 3
[T2] 2 1
[T3]
move disk 3 from [T1] to [T3]
[T1]
[T2] 2 1
[T3] 3
move disk 1 from [T2] to [T1]
[T1] 1
[T2] 2
[T3] 3
move disk 2 from [T2] to [T3]
[T1] 1
[T2]
[T3] 3 2
move disk 1 from [T1] to [T3]
[T1]
[T2]
[T3] 3 2 1