为什么不对啊,结果都出不来
#include <stdio.h>
int main()
{
printf("打的总费用:%f\n",fee(9,12)+fee(18,12));
return 0;
}
double fee(double t,double km)
{
double money;
if(km<=3)
{
money=14;
printf("车费为%f元",money);
}
else
{
if(t>=5&&t<23)
{
money=(13+2.3*(km-3)+1);
printf("日间车费为:%f\n",money);
}
else
{
money=13+2.3*1.2*(km-3)+1;
printf("夜间车费为:%f\n",money);
}
return money;
}
}
😭