当前位置:网站首页>Calculate a=1, a2=1/1=a1
Calculate a=1, a2=1/1=a1
2022-06-26 16:42:00 【Muzi..】
#include<stdlib.h>
#include<stdio.h>
float fun(int n);
int main()
{
int n;
printf("\nplease enter n:");
scanf("%d",&n);
printf("A%d=%lf\n",n,fun(n));
}
float fun(int n)
{
float A=1;
int i;
for(i=2;i<=n;i++)
{
A=1.0/(1+A);
}
return A;
}
边栏推荐
- R language uses cor function to calculate the correlation matrix for correlation analysis, uses corrgram package to visualize the correlation matrix, reorders rows and columns using principal componen
- Memory partition model
- Redis顺序排序命令
- LeetCode Algorithm 24. 两两交换链表中的节点
- 当一个程序员一天被打扰 10 次,后果很惊人!
- MHA switching (recommended operation process)
- Greenplum database fault analysis - semop (id=2000421076, num=11) failed: invalid argument
- 100+数据科学面试问题和答案总结 - 基础知识和数据分析
- Développer un opérateur basé sur kubebuilder (démarrer)
- Redis 迁移(操作流程建议)
猜你喜欢
Natural language inference with attention and fine tuning Bert pytorch
【力扣刷题】二分查找:4. 寻找两个正序数组的中位数
5g is not flat and 6G is restarted. China leads wireless communication. What is the biggest advantage of 6G?
【力扣刷题】单调栈:84. 柱状图中最大的矩形
架构实战营毕业设计
Scala 基础 (二):变量和数据类型
国内首款开源 MySQL HTAP 数据库即将发布,三大看点提前告知
MS | Xie Liwei group found that mixed probiotics and their metabolites could alleviate colitis
Make up the weakness - Open Source im project openim about initialization / login / friend interface document introduction
Qt 5.9.8 安装教程
随机推荐
Stm32f103c8t6 realize breathing lamp code
若依微服务特殊字符串被过滤的解决办法
Acid of redis
Cookie和Session详解
了解下常见的函数式接口
MHA switching (recommended operation process)
Constructors and Destructors
STM32F103C8T6实现呼吸灯代码
In a bad mood, I just write code like this
建立自己的网站(16)
并发编程整体脉络
day10每日3题(2):统计最大组的数目
国内首款开源 MySQL HTAP 数据库即将发布,三大看点提前告知
IAR engineering adapts gd32 chip
Develop operator based on kubebuilder (for getting started)
Redis Guide (8): principle and implementation of Qianfan Jingfa distributed lock
【207】Apache崩溃的几个很可能的原因,apache崩溃几个
[Blue Bridge Cup training 100 questions] scratch distinguishing prime numbers and composite numbers Blue Bridge Cup scratch competition special prediction programming question intensive training simul
Exquisite makeup has become the "soft power" of camping, and the sales of vipshop outdoor beauty and skin care products have surged
Keepalived 实现 Redis AutoFailover (RedisHA)