我这个代码怎么错了??
#include <stdio.h>
float cost(int km,int tm)
{
float a=2.3;
int b=13;
float c=2.3*1.2;
int d=1;
float money;
if(km<=3)
{
money=b;
printf("花费为%f\n");
}
else
{
if(tm>=23 || tm<5)
{
money=b+c*(km-3)+d;
printf("夜间费用%f\n");
}
else
{
money=b+(km-3)*a+d;
printf("日间费用为%d\n");
}
return money;
}
int main()
{
float sum=cost(12,9)+cost(12,18);
printf("总费用为%.1f\n",sum);
getchar();
return 0;
}