为什么结果为69.400002 最后的2是怎么来的
#include <stdio.h>
float CostComputer(int time ,int distance);
int main()
{
float Sum_day=0;
Sum_day=CostComputer(9,12)+CostComputer(18,12);
printf("小明每天打车的总费用为%f",Sum_day);
return 0;
}
float CostComputer(int time ,int distance)
{
float price=2.3;
float Sum=0;
if(time>=23||time<5)
price=1.2*price;
if(distance<=3)
Sum=13+1;
else
Sum=13+(distance-3)*2.3+1;
return Sum;
}