求个兄弟改一下
#include <stdio.h>
float getTaxi(int clock,int mile){
float money;
if(mile<=3){
money=14;
}
else if(clock>=23 || clock<5){
money=13+1+(mile-3)*(2.3+2.3*0.2);
}
else{
money=13+1+(mile-3)*2.3;
}
return money;
}
int main()
{
printf("此次打车费用为%.1f\n元",getTaxi(9,12)+getTaxi(18,12));
return 0;
}