mirror of
https://github.com/This-weiyuqing/DSAndOS.git
synced 2026-10-18 03:03:58 +08:00
update
This commit is contained in:
1 parent
16d694ffe3
commit
35e5484d7c
183 files changed
+362
-7145
No files matched your search
@@ -0,0 +1,16 @@
|
||||
/***Hanoi塔问题***/
|
||||
|
||||
#include"3.10.h"
|
||||
|
||||
int main() {
|
||||
int n;
|
||||
char a, b, c;
|
||||
a = '1';
|
||||
b = '2';
|
||||
c = '3';
|
||||
cout << "请输入初始第一个柱子上的圆盘个数:" << endl;
|
||||
cin >> n;
|
||||
cout << "将第一个柱子上的圆盘全部移动到第三个柱子上的过程为:" << endl;
|
||||
Hanoi(n, a, b, c);
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user