Exercise 5.36 from the textbook
(Tower of Hanoi) There are three pegs and n disks of different sizes. Initially, all disks are on the leftmost peg and arranged in order of decreasing size, with the smallest disk on top. The task is to move all the disks to the rightmost peg, under the constraints that:
Only one disk can be moved in each step; and
A larger disk may never be placed on top of a smaller disk.
Write a C program that prints a sequence of moves that completes the task.
(Figure from https://upload.wikimedia.org/wikipedia/commons/0/07/Tower of Hanoi.jpeg)