为什么这样算出来答案是 28.0
#include <stdio.h>
int distance =12;
int clock = 9 && 18;
int main()
{
float cost;
int distance;
int clock;
if(distance <= 3)
{
cost = 14*2;
}
else
{
if(clock >= 23 || clock < 5)
{
cost =(14+(distance-3)*2.3*1.2)*2;
}
else
{
cost = (14+(distance-3)*2.3)*2;
}
}
printf("车费是%.1f",cost);
return 0;
}