题解 | #获取两数中的较大值#
获取两数中的较大值
http://www.nowcoder.com/practice/136bd5e1021d4d698b9f5227d7dfb684
#include using namespace std;
int main() {
// write your code here......
int a,b;
cin>>a>>b;
//使用三元运算符
//int c=a>b ? a:b;
//if判断
int c;
if(a>b){
c=a;
}else{
c=b;
}
cout<<c<<endl;
return 0;
}

