-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path1042 Simple Sort.cpp
51 lines (46 loc) · 973 Bytes
/
1042 Simple Sort.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Please Do not copy and submit these code without trying more than three times.
#include <iostream>
using namespace std;
int main()
{
int a , b , c , s , m , l;
cin >> a >> b >> c;
if(a < b ){
if(a < c){
s = a;
if(b < c){
m = b;
l = c;
}
else{
m = c;
l = b;
}
}
else{
s = c;
m = a;
l = b;
}
}
else{
if(b < c){
s = b;
if(a < c){
m = a;
l = c;
}
else{
m = c;
l = a;
}
}
else{
s = c;
m = b;
l = a;
}
}
cout << s << endl << m << endl << l << endl << endl;
cout << a << endl << b << endl << c << endl;
}