/...算出来68问题在哪里
#include <stdio.h>
int cost(double distance,int time)
{
double sum;
if(distance<=3)
{
sum=13;
}
else if(distance>3)
{
if(time<=5||time>23)
{
sum=13+(distance-3)*2.3*1.2;
}
else if(time>5&&time<=23)
{
sum=13+(distance-3)*2.3;
}
}
return sum+1;
}
int main()
{
printf("小明路费为%d\n",cost(12,18)+cost(12,9));
return 0;
}