-
Notifications
You must be signed in to change notification settings - Fork 0
/
ex8.c
35 lines (35 loc) · 997 Bytes
/
ex8.c
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
#include<stdio.h>
int main() {
int valor1, valor2, valor3;
scanf("%d%d%d", &valor1, &valor2, &valor3);
if((valor1 <= valor2) && (valor2 <= valor3)){
printf("\n%d\n%d\n%d\n", valor1, valor2, valor3);
}
else{
if((valor1 <= valor3) && (valor3 <= valor2)){
printf("\n%d\n%d\n%d\n", valor1, valor3, valor2);
}
else{
if((valor2 <= valor1) && (valor1 <= valor3)){
printf("\n%d\n%d\n%d\n", valor2, valor1, valor3);
}
else{
if((valor2 <= valor3) && (valor3 <= valor1)){
printf("\n%d\n%d\n%d\n", valor2, valor3, valor1);
}
else{
if((valor3 <= valor1) && (valor1 <= valor2)){
printf("\n%d\n%d\n%d\n", valor3, valor1, valor2);
}
else{
if((valor3 <= valor2) && (valor2 <= valor1)){
printf("\n%d\n%d\n%d\n", valor3, valor2, valor1);
}
}
}
}
}
}
printf("\n%d\n%d\n%d\n", valor1, valor2, valor3);
return 0;
}