5-14不知错在哪里,请大腿们找找
#include <stdio.h>
int main()
{
printf("总车费为%d",fare(12,9)+fare(12,18))
return 0;
}
float fare(int distance,int time)
{ int money;
if(distance<=3)
{ money=14;}
else{money=distance*2.3+1;}
if(time>=23||time<=5)
{money=distance*2.1*1.2+1;}
else{}
return money;
}