You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
396 B
19 lines
396 B
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
ios::sync_with_stdio(false); //读入输出优化的强迫症
|
|
int a[3];
|
|
cin >> a[0] >> a[1] >> a[2];
|
|
//快排
|
|
// sort(a, a + 3, greater<int>()); //降序
|
|
sort(a, a + 3, less<int>()); //升序
|
|
|
|
//输出数组
|
|
for (int i = 0; i < 3; i++) {
|
|
cout << a[i]<<" ";
|
|
}
|
|
cout << endl;
|
|
return 0;
|
|
} |