摘要: #include <stdio.h>int main(){ int i=0; int j=0; int arr[10];int min;int t;printf("请输入10个数据\n");for(i=0;i<10;i++) { scanf("%d",&arr[i]); //输入10个数据 }pri 阅读全文
posted @ 2021-11-05 14:22 小杜加油 阅读(387) 评论(0) 推荐(0)
摘要: 青蛙跳台阶问题类似于斐波列娜阶数问题, 其台阶阶数 == 1 2 3 4 5 6 7 8 其数据排列如下所示;1 2 3 5 8 13 21 由此可归纳出 当n=1,输出1.当n=2;输出2,当n>3时认为前两个值相加等于此时值,可得到如下函数 #include <stdio.h> int jump 阅读全文
posted @ 2021-11-05 11:16 小杜加油 阅读(99) 评论(0) 推荐(0)
摘要: 最大公约数和最小公倍数通过两种方法实现 阅读全文
posted @ 2021-11-05 10:45 小杜加油 阅读(128) 评论(0) 推荐(0)
摘要: 折中算法查询数据 阅读全文
posted @ 2021-11-05 09:20 小杜加油 阅读(127) 评论(0) 推荐(0)
摘要: 实参;真正传给函数的参数,叫实参。实参可以是;常量,表达式,函数;但是无论如何,最后传给函数的值必须是一个确定的值。 形参;函数名后括号中的变量,用来存储调用函数时的实参,形参在被调用完以后就会被自动销毁,因此形参只有在函数中才有效。 传值调用;是把函数外部创建变量的内存地址传递给函数参数的一种调用 阅读全文
posted @ 2021-10-19 14:06 小杜加油 阅读(319) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int a,b,c,i=0; for (i = 99; i < 1000; i++) { a = i / 100;//取百位数 b = (i % 100) / 10;//取十位数 c = i % 10;//取个位数 if ((a*a*a 阅读全文
posted @ 2021-10-17 17:18 小杜加油 阅读(59) 评论(0) 推荐(0)