为什么我return没写也对了 ?
#include <stdio.h>
double money(int sj,int jl)
{
double money;
if(sj>=23 || sj < 5)
{
if(jl<=3)
{
money = 13+1;
}
else
{
money = 13+1+(jl-3)*2.3*1.2;
}
}
else
{
if(jl<=3)
{
money = 13+1;
}
else
{
money = 13+1+(jl-3)*2.3;
}
}
}
int main()
{
double sum;
sum = money(9,12)+money(6,12);
printf("%.1lf",sum);