-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathif11.java
More file actions
30 lines (24 loc) · 578 Bytes
/
if11.java
File metadata and controls
30 lines (24 loc) · 578 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
package ifdirect;
import java.util.Scanner;
public class if11 {
public static void main(String[] args) {
int a,b;
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){
if (a < b) {
a=b;
} else {
b=a;
}
}else {
a=0;
b=0;
}
System.out.println(b);
System.out.println(a);
}
}