标签:else getc -- nbsp etc har include alt can
#include<stdio.h>
move(int n,char x,char y,char z){
if(n == 1)
printf("%c --> %c",x,y,z);
else
{
move(n,x,z,y);
printf("%c --> %c",x,y);
move(n,y,x,z);
}
}
int main(void){
int n;
printf("input diskes number:\n");
scanf("%d",&n);
printf("The step to moving %d diskes:\n");
move(n,‘A‘,‘B‘,‘C‘);
getch();
return 0;
}
1.不晓得怎么改?
2.hanoi的记录总共需要走几步怎么写?
麻烦哪个大神给我改下代码,是在此基础上,不要新代码 留个言,多谢
标签:else getc -- nbsp etc har include alt can
原文地址:http://www.cnblogs.com/wanghui626/p/6033742.html