#include<stdio.h>
double fun(int n)
{
int i,j;
double m=1,sum=1;
for(i=1;i<=n;i++)
{
m=m*i;
sum+=1.0/m;
}
return sum;
}
void main()
{
printf("计算结果=%f",fun(25));
}
double fun(int n)
{
int i,j;
double m=1,sum=1;
for(i=1;i<=n;i++)
{
m=m*i;
sum+=1.0/m;
}
return sum;
}
void main()
{
printf("计算结果=%f",fun(25));
}