请问为什么我运行成功结果却是69.400002 不应该是69.400000吗?
#include <stdio.h>
float taxiFee(int n,int t)
{
float fee;
if((t<23)&&(t>=5))
{
if(n<=3)
{
fee = 13+1;
}
else
{
fee = 13+1+(n-3)*2.3;
}
}
else
{
if(n<=3)
{
fee = 13+1;
}
else
{
fee = 13+1+(n-3)*2.3*(1+0.2);
}
}
return fee;
}
int main()
{
float feeall;
feeall = taxiFee(12,9)+taxiFee(12,18);
printf("小明每天打车总费用为%f元",feeall);
}