求教,错在哪?
#include <stdio.h>
int money(int n; int x)
{
float y;
if (n <= 3)
{
y = 13 + 1;
}
else if (x<5||x >= 23)
{
y = 13 + 1 + 2.3*(1 + 0.2)*(n - 3);
}
else
{
y = 13 + 1 + 2.3*(n - 3);
}
return y;
}
int main()
{
float sum ;
sum =money(12,9)+money(12,6);
printf_s("小明每天打车的费用为%f", sum);
return 0;
}