#include
int main(void)
{
int n;
int i,j;
float sum = 1.0;
float dex = 1.0;
printf("输入一个数:");
scanf("%d",&n);
for (i = 2; i 0; --j)
{
dex*=j;
}
sum+=1/dex;
dex = 1.0;
}
printf("%.2fn",sum);
return 0;
}
#include
int main(void)
{
int n;
int i,j;
float sum = 1.0;
float dex = 1.0;
printf("输入一个数:");
scanf("%d",&n);
for (i = 2; i 0; --j)
{
dex*=j;
}
sum+=1/dex;
dex = 1.0;
}
printf("%.2fn",sum);
return 0;
}