慕函数1206615
2019-11-19 10:28
#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;
}
把主函数里的
int distance;
int clock;
删掉试试
C语言入门
926207 学习 · 20797 问题
相似问题