摘要:
思路: 1 #include <stdio.h> 2 //将n个盘子从x借助y移动到Z 3 void move(int n,char x,char y,char z) 4 { 5 if(n==1) 6 printf("%c-->%c\n", x, z); 7 else 8 { 9 move(n - 阅读全文
posted @ 2020-08-29 23:19
wind_y
阅读(140)
评论(0)
推荐(0)
摘要:
递归函数:调用自身的函数称为递归函数 1 #include <stdio.h> 2 void print() 3 { 4 char a; 5 scanf("%c", &a); 6 if(a!='#') 7 print(); 8 if(a!='#') 9 printf("%c", a); 10 } 1 阅读全文
posted @ 2020-08-29 21:23
wind_y
阅读(96)
评论(0)
推荐(0)

浙公网安备 33010602011771号