预支劫掠
2021-09-03 21:47
#include <stdio.h>
int distance = 12;
int x;
float y,fee1,fee2;
int main()
{
basicfee();
fee1 = time1(6);
fee2 = time1(9);
float sum = fee1 + fee2;
printf("小明每天打车总费用为%f元", sum);
return 0;
}
float time1(int t)
{
if (t >= 23 || t <= 5)
y *= 1.2;
return y;
}
float basicfee()
{
x = distance;
if (x <= 3)
{
y = 13;
}
else
{
y = 13 + (x - 3) * 2.3;
}
return y;
}
没有调用函数
C语言入门
926028 学习 · 20793 问题
相似问题