不懂哪里错了
{
float sum;
sum=pay(9,12)+pay(18,12);
printf("小明每天打车的总费用为%f\n",pay,distance,time);
}
#include <stdio.h>
double pay(int time,int distance)
{
double pay;
if(time<5||time>23)
{
if(distance<=3)
pay=14;
else
pay=14+(distance-3)*2.3;
}
else
{
if(diatance<=3)
{
pay=14;
}
else
pay=14+(distance-3)*2.3*1.2;
}
printf("pay=%f\n",pay);
}
int main()