这道题代码和别人的一样,得到的结果精度缺失!
float fun ( float h )
{
int num;float x;
num=(h*1000 5)/10;
x=num/100.0;
return x;
}
你的输出结果是什么?怎么丢失精度了?