#include <stdio.h>
int max3(int a,int b,int c){
int max = a;
if (b > max){
max = b;
}
if (c > max){
max = c;
}
return max;
}
int main(){
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
double sum1 = max3(a + b, b, c);
double sum2 = max3(a, b+c, c);
double sum3 = max3(a, b, b+c);
double sum = sum1 / (sum2 + sum3);
printf("%0.2lf\n", sum);
return 0;
}
案例,求一个特殊分数。
最新推荐文章于 2024-08-24 06:23:53 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)