求解,哪里出了问题?,得出来的值70.0002
#include <stdio.h>
float time1(int t,int n)
{
float sum;
if(t>=5&&t<23)
{
if(n<=3){
sum=14;
}
else{
sum=14+1+(n-3)*2.3;
}
}
else
{
if(n<=3){
sum=14;
}
else{
sum=14+(n-3)*2.3*1.2;
}
}
return sum;
}
int main()
{
int a=9,b=18;
int s=12;
float summm=time1(a,s)+time1(b,s);
printf("%f\n",time1(b,s));
return 0;
}