摘要:
#includevoid hanoi(int n,char x,char y,char z){ static int c = 0; if(n==1) printf("%d. Move disk %d form %c to %c\n", ++c,n,x,z); else { hanoi(n-1,x,z,y); printf("%d. Move disk %d form %c to %c\n", ++c,n,x,z); hanoi(n-1,y,x,z); }}void main(){ hanoi(8,'A'... 阅读全文
posted @ 2014-03-25 21:21
匡子语
阅读(296)
评论(0)
推荐(0)
摘要:
#include#include using namespace std;typedef int Status;const int TRUE=1;const int FALSE=0;const int OK=1;const int ERROR=0;const int INFEASIBLE=-1;const int overflow=-2;const int STACK_INIT_SIZE=100;const int STACKINCREMENT=10;typedef struct{ char *base; char *top; int stacksize;}SqStack;/... 阅读全文
posted @ 2014-03-25 14:50
匡子语
阅读(325)
评论(0)
推荐(0)

浙公网安备 33010602011771号