#include<stdio.h>
#include<math.h>
float fun(float n)
{
float i=1,a=1, e=0;
while(i<=n)
{a*=i;
e+=1/a;i++;}
return e;
}
void main()
{
float x;
scanf("%f",&x);
printf("%f",fun(x)+1);
}
07-20
07-20
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交