-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIf22.java
More file actions
23 lines (21 loc) · 628 Bytes
/
If22.java
File metadata and controls
23 lines (21 loc) · 628 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package ifdirect;
import java.util.Scanner;
public class If22 {
public static void main(String[] args) {
Scanner scanner=new Scanner (System.in);
int x,y;
System.out.print ("X: ");
x=scanner.nextInt ();
System.out.print ("Y: ");
y=scanner.nextInt ();
if (x>0 && y>0){
System.out.println ("1-Chorak");
} else if (x<0 && y>0) {
System.out.println ("2-chorak");
} else if (x<0 && y<0 ) {
System.out.println ("3-chorak");
} else if (x>0 && y<0) {
System.out.println ("4-chorak");
}
}
}