用计算的方式,求两个数之间的最大值和最小值

min{a, b} = (a+b)/2 - |a-b|/2

max{a, b} = (a+b)/2 + |a-b|/2

猜你喜欢

转载自blog.csdn.net/zdx1996/article/details/108461791