-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOddEven.java
40 lines (33 loc) · 874 Bytes
/
OddEven.java
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
31
32
33
34
35
36
37
38
39
40
public class OddEven {
public static void main(String[] args) {
int a = 12,b=42,c=10,d=13;
if(a>b){
if (a>c){
if(a>d){
System.out.println(a);
}else{
System.out.println(d);
}
} else{
if (c>d){
System.out.println(c);
}else{
System.out.println(d);
}
}
}else{
if(b>c)
{if(b>d){
System.out.println(b);
}else{
System.out.println(d);
}
}else{if(c>d){
System.out.println(c);
}
else{
System.out.println(d);
}}
}
}
}