-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBee1041.java
More file actions
32 lines (26 loc) · 816 Bytes
/
Copy pathBee1041.java
File metadata and controls
32 lines (26 loc) · 816 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
import java.util.Scanner;
import java.util.Locale;
public class Bee1041 {
public static void main(String[] args) {
Locale.setDefault(Locale.US);
Scanner ler = new Scanner(System.in);
double x = ler.nextDouble();
double y = ler.nextDouble();
if (x == 0 && y == 0) {
System.out.println("Origem");
} else if (x == 0) {
System.out.println("Eixo Y");
} else if (y == 0) {
System.out.println("Eixo X");
} else if (y > 0 && x > 0) {
System.out.println("Q1");
} else if (y > 0 && x < 0) {
System.out.println("Q2");
} else if (y < 0 && x < 0) {
System.out.println("Q3");
} else if (y < 0 && x > 0) {
System.out.println("Q4");
}
ler.close();
}
}