I'm trying to display the pegs of the Hanoi Towers recursive algorithm. I want each step to appear separately as such:
For example if the number of disks is 2
A: 2 1
B:
C:
Move disk 1 from A to B
A: 2
B: 1
C:
Move disk 2 from A to C
A:
B: 1
C: 2
Move disk 1 from B to C
A:
B:
C: 2 1
How can I display the pegs like this in c++?