#include<math.h>
#include<stdio.h>
int main(void)
{
const double ANSWER=3.14159;
double response;
printf("What is the value of pi?\n");
scanf("%lf",&response);
while(fabs(response-ANSWER)>0.0001)
scanf("lf",&response);
printf("Try it again\n!");
printf("close enough\n");
return 0;
#include<stdio.h>
int main(void)
{
const double ANSWER=3.14159;
double response;
printf("What is the value of pi?\n");
scanf("%lf",&response);
while(fabs(response-ANSWER)>0.0001)
scanf("lf",&response);
printf("Try it again\n!");
printf("close enough\n");
return 0;
}
第五版程序6.5
运行程序之后出现while 循环跳不出来的情况,改了很久查了资料也没有找到原因,求大神指教