Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if(a > 0 && b > 0){
System.out.println("1");
}
if(a < 0 && b > 0){
System.out.println("2");
}else if(a < 0 && b < 0){
System.out.println("3");
}else if(a > 0 && b < 0){
System.out.println("4");
}
Solution
New
Comments
- Popular
- New
- Old
You must be signed in to leave a comment
This page doesn't have any comments yet