题解 | #小乐乐计算函数#
小乐乐计算函数
https://www.nowcoder.com/practice/89238e99c36e450786ccf3a9e7481b7b
#include<stdio.h> int main() { int a=0,b=0,c=0; scanf("%d %d %d",&a,&b,&c); double fz=0,fm1=0,fm2=0; fz=((a+b)>b?(a+b):b)>c?((a+b)>b?(a+b):b):c; fm1=(a>(b+c)?a:(b+c))>c?(a>(b+c)?a:(b+c)):c; fm2=(a>b?a:b)>(b+c)?(a>b?a:b):(b+c); double m=fz/(fm1+fm2); printf("%lf",m); return 0; }