#include <stdio.h>
int gongli;
float taxi(gongli=12)
{
float money
if (gongli<=3)
{
money=13+1;
printf("小于3公里时的费用为%f元",money);
}
else
{
money=13+1+2.3*(gongli-3);
printf("大于3公里时的费用为%f元",money);
}
return money;
}
int main()
{
printf("打车总费用为%f元",taxi);
return 0;
}
lccundefined
相关分类