程序出了问题,请指错
#include<stdio.h>float Xd,Xf,Xw,a,R;
float f(float);
float g(float);
float h(float);
main()
{
printf("pao dian jin liao\n");
printf("please enter the value of Xd,Xf,Xw,,a,R\n");
scanf("%f%f%f%f%f",&Xd,&Xf,&Xw,&a,&R);
int i,j,sum;
float X[10],Y[10],M[10],N[10];
Y[1]=Xd;
for(i=1;i<10;i++)
{
X[i]=f(Y[i]);
if(X[i]<=Xf)
break;
Y[i+1]=g(X[i]);
}
printf("jin liao ban wei zhi shi%d\n",i);
for(j=1;j<10;j++)
{
N[j+1]=h(M[j]);
M[j+1]=f(N[j+1]);
if(M[j+1]<=Xw)
break;
}
for(i=1;i<10;i++)
{
while(X[i])
printf("when i=%d,X[i]=%f\n",i,X[i]);
while(Y[i])
printf("when i=%d,Y[i]=%f\n",i,Y[i]);
}
for(j=1;j<10;j++)
{
while(M[i])
printf("when j=%d,M[i]=%f\n",j,M[i]);
while(Y[i])
printf("when j=%d,N[i]=%f\n",j,N[i]);
}
sum=i+j;
printf("zong ban shu shi %d\n",sum);
return;
}
float f(float b)
{
float x;
x=b/(a+(a-1)*b);
return(x);
}
float g(float c)
{
float y;
y=R/(R+1)*c+1/(R+1)*Xd;
return(y);
}
float h(float c)
{
float z;
z=1.33*c-0.033;
return(z);
}