-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1042.cpp
More file actions
52 lines (47 loc) · 712 Bytes
/
Copy path1042.cpp
File metadata and controls
52 lines (47 loc) · 712 Bytes
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
52
#include <iostream>
#include <iomanip>
#include <math.h>
#include <string>
using namespace std;
int menor(int a, int b, int c){
int menorzin;
if(a < b){
menorzin = a;
} else {
menorzin = b;
}
if(menorzin < c){
return menorzin;
} else {
return c;
}
}
int maior(int a, int b, int c){
int grande;
if(a > b){
grande = a;
} else {
grande = b;
}
if(grande > c){
return grande;
} else {
return c;
}
}
int escrever(int x, int y, int z){
cout << x << endl << y << endl << z << endl;
};
int main()
{
int a,b,c,i,x,y,z;
cin >> a >> b >> c;
x = a; y = b; z = c;
x = menor(a,b,c);
z = maior(a,b,c);
y = a+b+c-x-z;
escrever(x,y,z);
cout << endl;
escrever(a,b,c);
return 0;
}