AcWing 663. 简单排序
原题链接
中等
作者:
NeonSean
,
2020-08-07 16:48:30
,
所有人可见
,
阅读 441
#include <iostream>
using namespace std;
int min(int a, int b) {
if (a > b)
return b;
else return a;
}
int max(int a, int b) {
if (a > b)
return a;
else return b;
}
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(a, min(b, c)) << endl;
cout << a + b + c - min(a, min(b, c)) - max(a, max(b, c)) << endl;
cout << max(a, max(b, c)) << endl;
cout << endl;
cout << a << endl;
cout << b << endl;
cout << c << endl;
return 0;
}