大佬们帮看看为啥输出一直是14啊
#include <stdio.h>
double cost(double s,double t)//定义路程 时间
{
int money;
if(5<=t<23)//白天的价钱
{
if(0 <= s <= 3)
{
money = (13+1);
}
else
{
money = (13+1)+(s-3)*2.3;
}
}
else//晚上的价格
{
if(0 <= s <= 3)
{
money = (13+1);
}
else
{
money = (13+1)+(s-3)*2.3*1.2;
}
}
return money;
}
int main()
{
printf("小明打车总费用%f\n",cost(12,9),cost(12,18));
return 0;
}