5.26

发布时间 2023-05-26 08:40:39作者: 孙锺鸣

#include<stdio.h>
main(){
double s=0,t;
int i,n,j;
printf("please input the number of n:");
scanf("%d",&n);
for(i=1;i<=n;i++){
t=1;
for(j=1;j<=i;j++)
t=t*j;
s=s+1/t;}
printf("%f",s);}