求助高手看看程序的错误!
#include<stdio.h>#include<math.h>
void main(void)
{
double QZ,HZ,ZC,Mc,Kf,Kr,Ys,Mf,Mr,wr,wf;
double ZB,HZB,wfr,kfr,kfy,kry;
scanf("%f%f%f%f%f%f%f%f%f",&QZ,&HZ,&ZC,&Mc,&Kf,&Kr,&Ys,&Mf,&Mr);
printf("%f,%f,%f,%f,%f,%f,%f,%f,%f\n",QZ,HZ,ZC,Mc,Kf,Kr,Ys,Mf,Mr);
ZB=(QZ/ZC);
HZB=(Ys/(Mc*QZ*HZ));
wf=sqrt(Kf/Mf);
wr=sqrt(Kr/Mr);
wfr=((ZB*(HZB+1)-1)/(ZB*(HZB+1)-HZB));
printf("%f,%f,%f,%f,%f\n",ZB,HZB,wf,wr,wfr);
if(wfr<0)
printf("Youyuzhoujuhehuangzaizhiliangwenti,wufapipei!\n");
else
if(((HZB<(ZB/(1-ZB)))&&(sqrt(wf/wr)<sqrt(wfr)))||((HZB>(ZB/(1-ZB)))&&((sqrt(wf/wr)>sqrt(wfr)))))
{
sprintf("wanquanjinxingpipei,buxuyaoyouhua!\n");
}
else
{
kfr=(wfr*Kr*Mf-Mf*Kf)/(Mr+wfr*Mf);
kfy=Kf+kfr;
kry=Kr-kfr;
Kf=kfy;
Kr=kry;
printf("%f,f%\n",Kf,Kr);
}
}