同学们帮忙看一下,哪错了啊
#include <stdio.h>
int cost(int distance,int time)
{
double price = 2.3;
double cost;
if(distance<=3){
cost = 13+1;
}else if(time<=23 && time>5){
cost = (distance-3)*price+1+13;
}else{
cost = (distance-3)*(price*1.2)+1+13;
}
}
int main()
{
double allcost = cost(12,9)+cost(12,18);
printf("小明每天打车是%f块钱",allcost);
return 0;
}