救救孩子吧,为什么我的只显示运行成功但是不显示总费用呢
#include <stdio.h>
int main()
{
int t=9;
int s=12;
double cost,costb;
if(t>=5&&t<=23)
{
if(s<=3)
{
double cost=14;
}
else if(s>3)
{
double cost=14+2.3*(s-3);
}
return cost;
}
else
{
if(s<=3)
{
double cost=14;
}
else if(s>3)
{
double cost=14+2.3*0.2*(s-3);
}
return cost;
}
int t2=18;
if(t2>=5&&t2<=23)
{
if(s<=3)
{
double costb=14;
}
else if(s>3)
{
double costb=14+2.3*(s-3);
}
return costb;
}
else
{
if(s<=3)
{
double costb=14;
}
else if(s>3)
{
double cost=14+2.3*0.2*(s-3);
}
return costb;
}
double money=cost+costb;
printf("小明每天打车花费%f\n",money);
return 0;
}