vc++计算e的近似值这样做有什么错?#include void main(){ double e=1.0,x=1.0,y,detax;int i=1;printf("\n please enter a detax:");scanf("%lf",&detax);y=1/x;while(y>-detax){\x05 x=x*i;\x05 y=1/x;\x05 e=e=y;\x05 ++i;}printf("%12.101f",e);}

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 01:49:03
vc++计算e的近似值这样做有什么错?#includevoidmain(){doublee=1.0,x=1.0,y,detax;inti=1;printf("\npleaseenteradetax:"

vc++计算e的近似值这样做有什么错?#include void main(){ double e=1.0,x=1.0,y,detax;int i=1;printf("\n please enter a detax:");scanf("%lf",&detax);y=1/x;while(y>-detax){\x05 x=x*i;\x05 y=1/x;\x05 e=e=y;\x05 ++i;}printf("%12.101f",e);}
vc++计算e的近似值这样做有什么错?
#include
void main()
{ double e=1.0,x=1.0,y,detax;
int i=1;
printf("\n please enter a detax:");
scanf("%lf",&detax);
y=1/x;
while(y>-detax)
{
\x05 x=x*i;
\x05 y=1/x;
\x05 e=e=y;
\x05 ++i;
}
printf("%12.101f",e);
}

vc++计算e的近似值这样做有什么错?#include void main(){ double e=1.0,x=1.0,y,detax;int i=1;printf("\n please enter a detax:");scanf("%lf",&detax);y=1/x;while(y>-detax){\x05 x=x*i;\x05 y=1/x;\x05 e=e=y;\x05 ++i;}printf("%12.101f",e);}
void main()
{ double e=1.0,x=1.0,y,detax;
int i=1;
printf("\n please enter a detax:");
scanf("%lf",&detax);
y=1/x;
while(y>=detax)
{
\x05x=x*i;
\x05y=1/x;
\x05e+=y;
\x05++i;
}
printf("%12.101f",e);
}