运行不了,求指出错误。。
#include <stdio.h>void main()
{
float T,t,C1,C2,C3,E1,E2,E3,X1,X2,X3,K1,K2,K3,f,f';
C1=4000;
C2=8000;
C3=12000;
X1=X2=X3=0.333;
E1=E2=E3=4644.7;
printf("请输入试差温度T:\n");
scanf("%f",&T);
do
{K1=C1*exp(-E1/(1.8*T+492));
K2=C2*exp(-E2/(1.8*T+492));
K3=C3*exp(-E3/(1.8*T+492));
f=K1*X1+K2*X2+K3*X3-1;
f'=K1*X1*(1.8*E1/pow((1.8*T+492),2))+K2*X2*(1.8*E2/pow((1.8*T+492),2))+K3*X3*(1.8*E3/pow((1.8*T+492),2));
t=T-f/f';
T=t;}
while(fabs(f)>0.001);
printf("运行结果T=%f\n",T);
}