#include<stdio.h>
#include<math.h>
long fect(int n)
{
long value;
if(n==1)
value=1;
else
value=n*fect(n-1);
return value;
}
void fun(int n)
{
int i;
long a;
float s=1,b=1;
for(i=1;i<=n;i++)
{
a=(fect(i));
s=s+b/a;
}
printf("%.6fnn",s);
}
int main()
{
int n;
while(1)
{
printf("请输入n:");
scanf("%d",&n);
fun(n);
}
return 0;
}
最后
以上就是苹果指甲油最近收集整理的关于三++40的全部内容,更多相关三++40内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复