#include <stdio.h>
int main()
{
float fee;
int kilo=12;
int time1=9;
getfee();
printf("%d点的打车费用是%f元\n",time1,fee);
return 0;
}
int getfee()
{
float fee;
int kilo,time1;
if(kilo>3)
{
fee=13+(kilo-3)*2.3;
while(time1>=23||time1<5)
fee*=1.2;
}
else
{
fee=13;
}
fee+=1;
return fee;
}
getfee();改为fee=getfee();你函数结果没有传回主函数