获取n个斐波那契数列 摘要:解题思路:通过for循环来达到只获取n个斐波那契数列注意事项:参考代码:#include<stdio.h>#define N 40int fblq(int x){ …… 题解列表 2025年12月24日 0 点赞 0 评论 2 浏览 评分:0.0
斐波纳契数列-迭代 摘要:#includeint main(){ int x; int k = 1,j=0,t,b; scanf("%d", &x); for (int i = 0; i < x; i+…… 题解列表 2025年07月18日 0 点赞 0 评论 212 浏览 评分:0.0
1131(C语言)最牛逼最简单的方法 摘要:#include <stdio.h>#include <string.h>int main(int argc, char *argv[]){ int n,i,m=1,j=0,k…… 题解列表 2025年02月10日 1 点赞 0 评论 473 浏览 评分:10.0
两种方法 兔子 摘要:#include<stdio.h> int main(void) { int a = 1, b = 1, c; int i, n; scanf("%d", &n); …… 题解列表 2024年12月29日 0 点赞 0 评论 295 浏览 评分:0.0
简单简单简单的1131 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int f(int n){ if(n==1||n==2) return 1; if(n>2) return f(n-1)+f(n-2);…… 题解列表 2024年11月27日 0 点赞 0 评论 432 浏览 评分:10.0
递归和迭代求解斐波那契数列 摘要:递归:#include <stdio.h> int Input() { int N; scanf("%d", &N); return N; } int Fib…… 题解列表 2024年07月29日 0 点赞 0 评论 313 浏览 评分:0.0
斐波那契数列 摘要:解题思路:用一个变量存储上一个数注意事项:无参考代码: #includde<stdio.h> int main(){ int n; int t; in…… 题解列表 2024年06月19日 0 点赞 0 评论 337 浏览 评分:6.0
c++超级简单的递归来一起看看吧! 摘要:解题思路:注意事项:如果n ==1或者2时,那么结果显然都是1,如果是大于2的话结果就是n-1位加上n-2位的数字这样递归就形成了参考代码:#include<iostream>using namesp…… 题解列表 2024年05月03日 0 点赞 0 评论 272 浏览 评分:0.0
无聊的星期六 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int fun(int n){ return (n<=1)?n:(fun(n-1)+fun(n-2)); } int m…… 题解列表 2024年04月27日 0 点赞 0 评论 183 浏览 评分:0.0