-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1042.java
More file actions
29 lines (21 loc) · 759 Bytes
/
1042.java
File metadata and controls
29 lines (21 loc) · 759 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
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a = in.nextInt();
int b = in.nextInt();
int c = in.nextInt();
int menorNumero, numeroMedio, maiorNumero;
menorNumero = Math.min(a, Math.min(b, c));
maiorNumero = Math.max(a, Math.max(b, c));
numeroMedio = a ^ b ^ c ^ menorNumero ^ maiorNumero;
System.out.println(menorNumero);
System.out.println(numeroMedio);
System.out.println(maiorNumero);
System.out.println("");
System.out.println(a);
System.out.println(b);
System.out.println(c);
}
}