C Programs / Towers of Hanoi C Program

Program
Input Enter number of disks:3
Output Move disk 1 from A peg to C peg
Moves disk 2 from A peg to B peg
Move disk 1 from C peg to B peg
Moves disk 3 from A peg to C peg
Move disk 1 from B peg to A peg
Moves disk 2 from B peg to C peg
Move disk 1 from A peg to C peg


Home     Back