题解 | #小乐乐计算函数#
小乐乐计算函数
http://www.nowcoder.com/practice/89238e99c36e450786ccf3a9e7481b7b
float max3(float a,float b,float c){
float x=0,y=0;;
x=a>b?a:b;
y=b>c?b:c;
return x>y?x:y;
}
int main(){
float m=0,a=0,b=0,c=0;
scanf("%f%f%f",&a,&b,&c);
m=max3(a+b,b,c)/(max3(a,b+c,c)+max3(a,b,b+c));
printf("%.2f",m);
return 0;
}