题解 | #获取两数中的较大值#
获取两数中的较大值
https://www.nowcoder.com/practice/136bd5e1021d4d698b9f5227d7dfb684
#include <iostream>
using namespace std;
int main() {
int a,b;
cin>>a>>b;
cout<<max(a,b);
return 0;
}
当大佬的感觉就是好,不用if,一个库函数就好了。顺带提一句,我帮大家测过了,直接用int就可以.
阿里云工作强度 710人发布
