c语言中为什么出现d:\debug\prog1.exe this file does not exist.do you want to build it?
我的程序为#include<math.h>#include<stdio.h>voidwriteDAT();floatcountValue(){floatx0,x1=0.0...
我的程序为#include <math.h>
#include <stdio.h>
void writeDAT();
float countValue()
{
float x0,x1=0.0;
while(1)
{
x0=x1;
x1=cos(x0);
if(fabs(x0-x1)<1e-6)
break;
}
return x1;
}
main()
{
printf("实根=%f\n",countValue());
printf(" %f\n",cos(countValue())-countValue());
writeDAT();
}
void writeDAT()
{
FILE *wf;
wf=fopen("out.dat","w");
fprintf(wf,"%f\n",countValue());
fclose(wf);
} 求助各位高手了 展开
#include <stdio.h>
void writeDAT();
float countValue()
{
float x0,x1=0.0;
while(1)
{
x0=x1;
x1=cos(x0);
if(fabs(x0-x1)<1e-6)
break;
}
return x1;
}
main()
{
printf("实根=%f\n",countValue());
printf(" %f\n",cos(countValue())-countValue());
writeDAT();
}
void writeDAT()
{
FILE *wf;
wf=fopen("out.dat","w");
fprintf(wf,"%f\n",countValue());
fclose(wf);
} 求助各位高手了 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询