Can you provide a sample code?
Tower of Hanoi problem
6 次查看(过去 30 天)
显示 更早的评论
There are three bars and n disks with holes in the center are stacked like towers on A bars. I'm going to move this tower to the C-bar. Enter N and create a program that shows the process of moving this tower. However, the disk grows as the number goes up, and the large disk cannot go up on the small disk. Tip: Use a recursive function.
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!