#include<stdio.h>
int main()
{
int time;
float distance,fee;
printf("please enter distance and time:\n");
scanf("%f%d",&distance,&time);
if(distance<3) fee=10;
else if(distance>=3) fee=10+(distance-10)*2;
else fee=10+7*2+(distance-10)*3;
fee=fee+time/5*2;
printf("fee=%.0f\n",fee);
return 0;
}
运行结果如下: