这里那儿错了
输入正整数n,当精确度分别取0.1,0.01,0.001.。。。。。时,计算并输出下列算式的值,s=1+1/2!+1/3!+1/4!.........#include<stdio.h>
#include<math.h>
int x;
double y;
double cal(int n)
{
double t=0,m,z;
int i,j,s=1;
{
while((int)m%10!=0){
i=1;
for(j=1;j<=i;j++)
s=j*s;
t=1/s+t;
z=1/s;
s=1;
i++;
m=t*pow(10,n+1);
}
t=t-z;
return t;
}
void main()
{
printf("请输入精确度x=\n");
scanf("%d",&x);
y=cal(x);
printf("%.%df\n",n,y);
}