45、递归的应用的一个例子-----Hanoi塔问题

一、问题描述 二、问题解决思想 三、C语言描述 四、C语言实现 #include "stdio.h" #include "stdlib.h" int c=0; //全局变量,对搬运次数进行计算 void move(char x,int n,char z) { printf("%d.Move disk %d from %c to%c\n",++c,n,x,z); }//move void hanoi
相关文章
相关标签/搜索