void 求abc中最小值的条件表达式()
{//缘由https://bbs.csdn.net/topics/395012541
int a = 44, b = 47, c = 49;
cout << (a > b ? b > c ? c : b : c > a ? a : c) << endl;
}
void 比较三个数最小(int a = 44, int b = 47, int c = 49)
{
cout << "最小" << (a > b ? b > c ? c : b : c > a ? a : c) << endl;
cout << "最大" << (a < b ? b < c ? c : b : c < a ? a : c) << endl;
}
void 比较三个数最小(int a = 44, int b = 47, int c = 49)
{
cout << "最小" << (a > b ? b > c ? c : b : c > a ? a : c) << endl;
cout << "最大" << (a < b ? b < c ? c : b : c < a ? a : c) << endl;
if (a<b&&b>c)cout << "最大" << b << endl;
else if (a<c&&c>b)cout << "最大" << c << endl;
else cout << "最大" << a << endl;
}