-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjavaIfElse.java
More file actions
34 lines (29 loc) · 798 Bytes
/
javaIfElse.java
File metadata and controls
34 lines (29 loc) · 798 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
31
32
33
34
import java.util.*;
public class javaIfElse {
public static void main(String[] args) {
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
// sc.close();
if(n%2==0)
{
if(n >=2&&n<=5)
{
System.out.println("Not Weird");
}
else if(n>=6 && n <= 20)
{
System.out.println("Weird");
}
else if(n>=20)
{
System.out.println("Not Weird");
}
}
else
{
System.out.println("Weird");
}
sc.close();
}
}