-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheje2845.java
More file actions
22 lines (21 loc) · 761 Bytes
/
eje2845.java
File metadata and controls
22 lines (21 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import java.util.Scanner;
public class eje2845
{
public static void main(String [] args){
Scanner lee = new Scanner(System.in);
while(true){
double x = lee.nextDouble();
double y = lee.nextDouble();
if(x == 0.0 && y == 0.0){
System.out.println("AXIS");
break;
}else{
if(x == 0.0 || y == 0.0) System.out.println("AXIS");
else if(x > 0.0 && y > 0.0) System.out.println("Q1");
else if(x < 0.0 && y > 0.0) System.out.println("Q2");
else if(x < 0.0 && y < 0.0) System.out.println("Q3");
else if( x > 0.0 && y <0.0) System.out.println("Q4");
}
}
}
}