-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path1042.java
70 lines (60 loc) · 1.16 KB
/
1042.java
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import java.io.IOException;
import java.util.Locale;
import java.util.Scanner;
/*
*
*/
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
Locale.setDefault(Locale.US);
int N1, N2, N3;
N1 = sc.nextInt();
N2 = sc.nextInt();
N3 = sc.nextInt();
// menor
if (N1 < N2 && N1 < N3) {
System.out.println(N1);
}
if (N2 < N1 && N2 < N3) {
System.out.println(N2);
}
if (N3 < N2 && N3 < N1) {
System.out.println(N3);
}
// meio
if (N1 > N2 && N1 < N3) {
System.out.println(N1);
}
if(N1>N3 && N1<N2) {
System.out.println(N1);
}
if (N2 > N1 && N2 < N3) {
System.out.println(N2);
}
if(N2>N3 && N2<N1) {
System.out.println(N2);
}
if (N3 > N1 && N3 < N2) {
System.out.println(N3);
}
if(N3>N2 && N3<N1) {
System.out.println(N3);
}
// maior
if (N1 > N2 && N1 > N3) {
System.out.println(N1);
}
if (N2 > N1 && N2 > N3) {
System.out.println(N2);
}
if (N3 > N2 && N3 > N1) {
System.out.println(N3);
}
System.out.println( );
System.out.println(N1);
System.out.println(N2);
System.out.println(N3);
sc.close();
}
}