#include#include,main(){int s;float n,t,p;t=1.0;p=0;n=1.0;s=

问题描述:

#include
#include,
main()
{int s;
float n,t,p;
t=1.0;
p=0;
n=1.0;
s=1;
while(fabs(t)>=1e-6);
{p=p+t;
n+=2.0
s=-s;
t=s/n;
}
p=4*p;
pintf("p=%f\n",p);
}
最后怎么输出--------------------Configuration:Cpp1 - Win32 Debug--------------------
Compiling...
Error spawning cl.exe
Cpp1.obj - 1 error(s),0 warning(s) 到底是哪里出错了啊
1个回答 分类:综合 2014-11-03

问题解答:

我来补答
第二行多个逗号,while那一行最后的分号去掉!
再问: 改回来了 还是错误啊 还有哪里有问题吗 麻烦帮我看看 谢了啊 #include #include main() {int s; float n,t,p; t=1.0; p=0; n=1.0; s=1; while(fabs(t)>=1e-6) {p=p+t; n+=2.0; s=-s; t=s/n; } p=4*p; pintf("p=%f\n",p); }
再答: while(fabs(t)>=1e-6) 更改为while(fabs(t)>=1*e-6)
再问: 怎么还是错误啊 郁闷
 
 
展开全文阅读
剩余:2000
上一页:一道物理提题