报错说括号有问题,请问哪里有问题
#include <stdio.h>
int cost(int distance,int time)
{
int sum;
if(distance<=3)
{
sum=13;
return sum+1;
}
else if
{
if(time<=23&&time>=5)
{
sum=13+(distance-3)*2.3*1.2;
return sum+1;
}
else if
{
sum=13+(distance-3)*2.3;
return sum+1;
}
}
}
int main()
{
int sum;
cost(12,6);
printf("小明路费为%d",sum+1);
return 0;
}