为什么会循环失败.
有一段代码:#include <stdio.h>
#include <math.h>
main()
{
float r2,r3,r4,rg,e,ig,result,uper,lint;
char c;
printf("please input r2,and r3,and r4,and e,and rg(end with enter):");
scanf("%f%f%f%f%f",&r2,&r3,&r4,&e,&rg);
do
{
printf("please input ig:");
scanf("%f",&ig);
result=(r2*r3*e-ig*(r2*r3*r4+rg*r2*r3+rg*r2*r4))/(e*r4+ig*(r2*r3+r3*r4+r4*r2+rg*r3+rg*r4));
printf("The result is:%f\n",result);
printf("The 1/t is:%f\n",1/result);
printf("the ln t is:%f\n",log(result));
printf(" Continue with Y");
}while((c=getchar())=='Y');
}
为什么不能循环啊.