This topic created in 4023 days ago, the information mentioned may be changed or developed.
能想到的是引入一个 t 变量,
如果 a<b, 调换 ab
如果 a<c, 调换 ac
最后比较 bc
得出结果
4 replies • 2015-10-28 00:08:39 +08:00
 |
|
1
hx1997 Oct 27, 2015
所以 t 变量是干啥的?交换?
难道不应该是
t = a; if (t < b) t = b; if (t < c) t = c;
吗?
|
 |
|
2
wsy2220 Oct 27, 2015 via Android
怎么清楚怎么写,代码是给人看的。 精简的事情编译器比你专业
|
 |
|
3
hx1997 Oct 27, 2015
啊,是我没看仔细。我以为是找最大的数来着。
那我觉得可能就是问题里那种写法了吧,如果说最简洁的。
|