![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C语言基础
BooM十五亿船长
这个作者很懒,什么都没留下…
展开
-
递归小例子,数字正序、逆序输出
#include <stdio.h>//正序void traverse(int n, int k);int main(void){int n;scanf("%d", &n);int lebal=1;int work = n;while (work/10 != 0){lebal= lebal *10;work /= 10;}traverse(n, le...原创 2019-08-10 14:53:24 · 584 阅读 · 0 评论 -
递归例子之汉诺塔
#include <stdio.h>//只要将第一轮想明白就好了,千万别深究//递归出口:只有一个disk的时候//递归式子:n个盘子搬来搬去void hanio(int n, char a, char b, char c);int main(int argc, const int * argv){int n;printf(“input the number of di...原创 2019-08-10 15:21:27 · 90 阅读 · 0 评论