#include <stdio.h>
float Money(int=km,int=tm)
{
float money;
if(km<=3)
{
money=14;
}
else
{
if(tm>=5&&tm<23)
{
money = (km-3)*2.3+14;
}
else
{
money = (km-3)*2.3*1.2+14;
}
}
return money;
}
int main()
{
printf("打车的总费用为%f\n",Money(12,9)+Money(12,18));
return 0;
}
float Money(int=km,int=tm)。。。。。666