-
Notifications
You must be signed in to change notification settings - Fork 0
/
BEE 1042 – Sort Simples.cs
47 lines (42 loc) · 1.04 KB
/
BEE 1042 – Sort Simples.cs
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
using System;
public class program {
public static void Main(String[] args) {
String input = Console.ReadLine();
String[] entrada = input.Split();
int a = int.Parse(entrada[0]);
int b = int.Parse(entrada[1]);
int c = int.Parse(entrada[2]);
if (a < b && a < c) {
Console.WriteLine(a);
if (b < c) {
Console.WriteLine(b);
Console.WriteLine(c);
} else {
Console.WriteLine(c);
Console.WriteLine(b);
}
} else if (b < c) {
Console.WriteLine(b);
if (a < c) {
Console.WriteLine(a);
Console.WriteLine(c);
} else {
Console.WriteLine(c);
Console.WriteLine(a);
}
} else {
Console.WriteLine(c);
if (a < b) {
Console.WriteLine(a);
Console.WriteLine(b);
} else {
Console.WriteLine(b);
Console.WriteLine(a);
}
}
Console.WriteLine("");
Console.WriteLine(a);
Console.WriteLine(b);
Console.WriteLine(c);
}
}