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