你的TC环境是不有问题啊?
好,我改进了一下,楼主再看看
double f11(double x,double e,double z)
{
if((e<=0.002)&&(e>=0.0))
f11=16.7*((2.0*(e-z*x))/0.002-((e-z*x)/0.002)*((e-z*x)/0.002));
else if((e<=0.0033)&&(e>=0.002))
f11=16.7*(1.0-0.15*((e-z*x)-0.002)/0.0013);
}
double f12(double x,double z,double e)
{
f12=16.7*((2.0*(e-z*x))/0.002-((e-z*x)/0.002)*((e-z*x)/0.002));
}
#include "math.h"
double fftsf(x)
double x;
{ double y;
y=f11(x);
return(y);
}
double fftsf(x)
{ double y;
y=f(12);
return(y);
}
#include "stdio.h"
#include "9ffts.c"
main()
{
double a,eps,e,k,fy1,fy2,es1,es2,h,ey1,ey2;
double z,xx1,xx2,gh1,gh2,t11,b;
double a12,b12,t12,h0,yn;
k=0.50;
h0=315.0;
while(e<=0.0033)
z=e/(k*h0);
xx1=300.00;
xx2=-300.00;
gh1=0.002/z;
a=0.0; b=k*h0-gh1; eps=0.000001;
t11=ffts(a,b,eps,f11);
a=k*h0-gh1; b=k*h0; eps=0.000001;
t12=ffts(a,b,eps,f12);
yn=t11+t12;
while ((xx2<=yn)&&(yn<=xx1))
z=e/(k*h0);
scanf("%f,%f,%f",&e,&k,&z);
if(yn<xx2)
do {k=k+0.0001;}
while (xx2<=yn);
if(yn>xx1)
do {k=k-0.0001;}
while (yn<=xx1);
printf("%f\n","%f\n",&z,&yn);
return 0;
}
主要是里面的错误怎么个改法