简单的自定义函数 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>int f(int x){ int y=10;&n…… 题解列表 2026年07月21日 0 点赞 0 评论 55 浏览 评分:0.0
简单的递归 摘要:#include<stdio.h> int ans(int n); int main(void) { int n; scanf("%d",&n); printf("…… 题解列表 2024年12月29日 0 点赞 0 评论 742 浏览 评分:0.0
简单的递归进行 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int f(int x){ if(x==1) return 10; if(x>1) return f(x-1)+2;}int main(…… 题解列表 2024年11月27日 0 点赞 0 评论 441 浏览 评分:0.0
C语言训练-求函数值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int fun(int x){ if(x==1) { return 10; } …… 题解列表 2023年01月05日 0 点赞 0 评论 584 浏览 评分:0.0
题解 1137: C语言训练-求函数值(C) 摘要:参考代码:#include<stdio.h> int main(void){ int x,y=10; int i; scanf("%d",&x); if(x>1){ …… 题解列表 2022年08月27日 1 点赞 0 评论 562 浏览 评分:0.0
1137: C语言训练-求函数值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int a=10,i,x;void fun1(){ scanf("%d",&x); if(x==1) { …… 题解列表 2022年01月25日 0 点赞 0 评论 565 浏览 评分:0.0
递归求解太简单了 摘要:```c # include int f(int x); int main(void){ int x; scanf("%d",&x); int sum=0; …… 题解列表 2021年06月08日 0 点赞 0 评论 571 浏览 评分:0.0
C语言训练-求函数值-题解(C语言代码)(递归) 规律就是第一个为10,往后每一个加2完全没看懂题.....第一种递归```c#includeintzi(intx){if(x==1){return10;}if(x>1){returnzi(x-1)+2;}}intmain(){intx;scanf("%d", 题解列表 2021年02月08日 0 点赞 0 评论 665 浏览 评分:0.0
C语言训练-求函数值-题解(C语言代码) 摘要:解题思路:没啥思路,比较简单注意事项:没啥需要注意的参考代码:#include<stdio.h> int main() { int i,x,y=0; //定义中间变量 scanf("%…… 题解列表 2021年02月04日 0 点赞 0 评论 581 浏览 评分:9.0
优质题解 C语言训练-求函数值--浅讲递归(c语言) ###解题思路递归函数看起来可能是很懵逼,为啥可以求出这个值呢?我不是只是returnf(x-1)+2吗?这就是递归的意义,一直递归到最后的f(1)的时候就可以全部转成数字了,举个例子,比如x=4的时候返回的是`f(4)=f(3)+2=(f(2)+2)+2=(f(1)+2)+2+2;`所以f(4) 题解列表 2020年12月10日 0 点赞 1 评论 2719 浏览 评分:9.9