假设有3个分别命名为A,B,C的柱子,在塔座A上插有n个直径大小各不相同,依小到大编号为1,2....,n从上到下排列。现要求将A轴上的n个圆盘移到C并仍按同样顺序叠排,圆盘按以下规则:
(1)每次只能一动一个盘子;
(2)圆盘可以插在A,B,C中任一个塔座上;
(3)任何时刻都不能将一个较大的圆盘压在较小的圆盘之上。
设计一个MFC程序,该程序能实现汉诺塔问题的每一步骤的解决方法,并实现界面友好的功能。
Suppose there are 3 columns, named A, B and C respectively, which have different diameters of N on the A of the tower, ranging from small to large, and 1,2 in number. N is arranged from top to bottom. It is now required that the N discs on the A axis be moved to C and still stacked in the same order.
(1) only one plate can be moved at a time;
(2) the disc can be inserted in any tower of A, B and C.
(3) no larger disk can be pressed on the smaller disk at any time.
Design a MFC program, which can solve every step of Hanoi Tower problem and realize the friendly interface function. (2018-06-19, C++, 143KB, 下载2次)
第六章实例源程序双机通信,代码很实用,可以下载 (2018-05-23, C++, 17KB, 下载0次)
http://www.pudn.com/Download/item/id/1527026250477438.html基于Window GUI 的汉诺塔的算法演示,仅仅是算法演示,不能控制 (2018-04-09, C++, 79KB, 下载1次)
http://www.pudn.com/Download/item/id/1523237950129367.html