题解 | #获取三个数中的最大值(三元表达式实现)#
获取三个数中的最大值(三元表达式实现)
https://www.nowcoder.com/practice/d7d48b7b44df46889137ec19d924bb14
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a; cin >> b; cin >> c; // write your code here...... int max1,max2,max; max1=a>b?a:b; max2=b>c?b:c; max=max1>max2?max1:max2; cout<<max<<endl; return 0; }