求问这个代码哪里不对?
#include <stdio.h>
int main()
{
float morningPay,eveningPay,totalPay;
morningPay=sum(9,12);
eveningPay=sum(18,12);
totalPay=morningPay+eveningPay;
printf("小明每天打车的总费用是:%f元\n",totalPay);
return 0;
}
float sum(int t,int d)
{
int pay;
if(t>5||t<=23)
{
if(d<=3)
{
pay=13+1;
}
else
{
pay=13+(d-3)*2.3+1;
}
}
else if(t<=5||t>23)
{
if(d<=3)
{
pay=13+1;
}
else
{
pay=13+(d-3)*2.3*1.2+1;
}
}
return pay;
}