-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathif7.java
More file actions
22 lines (20 loc) · 531 Bytes
/
if7.java
File metadata and controls
22 lines (20 loc) · 531 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package ifdirect;
import java.util.Scanner;
public class if7 {
public static void main(String[] args) {
int a,b,p=2;
Scanner scanner =new Scanner(System.in);
System.out.println("1-son:");
a=scanner.nextInt();
System.out.println("2-son:");
b=scanner.nextInt();
if (a< b){
p--;
System.out.println(p);
}else if (b<a){
System.out.println(p);
}else {
System.out.println("Ikkalasi ham teng");
}
}
}