这段代码哪里有问题,为什么答案不对?
#include <stdio.h>
int calculate1(int x)
{ int money;
money=x*2.3+13+1;
return money;
}
int calculate2(int x)
{ int money;
money=x*2.76+13+1;
return money;
}
int fn(int time)
{ int money,x=12;
if ((23<=time<=24)||(0<=time<=5))
{ money=calculate2(x);
}
else
{ money=calculate1(x);
}
return money;
}
int main()
{ int allmoney;
allmoney=fn(9)+fn(18);
printf("%d\n",allmoney);
return 0;
}