这个为什么运行不行
include <stdio.h>
float qhc(int t,int km)
{
float price;
if(23<=t<=24||0<=t<=5&&km<=3)
{
price=13+1;
}
else if(23<=t<=24||0<=t<=5&&km>3)
{
price=(km-3)*2.76+1;
}
else if(5<t<23&&km<=3)
{
price=13+1;
}
else
{
price=(km-3)*2.3+1;
}
return 0;
}
int main()
{
int t,km;
float jiage;
t=9;
km=6;
jiage=qhc(24,6);
printf("打车要多少钱%f\n",jiage);
return 0;
}
搜索
复制