题解 | #小乐乐计算函数#
小乐乐计算函数
https://www.nowcoder.com/practice/89238e99c36e450786ccf3a9e7481b7b
#include <stdio.h> int Max3(int x, int y, int z) { int temp = x; if (y > temp) { temp = y; } if (z > temp) { temp = z; } return temp; } int main() { int a = 0; int b = 0; int c = 0; scanf("%d %d %d",&a,&b,&c); printf("%.2f",(float)(Max3(a+b,b,c)) / (Max3(a,b+c,c) + Max3(a,b,b+c))); return 0; }