-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIfElse.java
More file actions
39 lines (29 loc) · 902 Bytes
/
IfElse.java
File metadata and controls
39 lines (29 loc) · 902 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
35
36
37
38
39
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
String ans="";
if(n%2==1){
ans = "Weird";
}
else{
if(n>=2 && n<=5){
ans = "Not Weird";
}
if(n>=6 && n<=20)
{
ans = "Weird";
}
else if(n>=20){
ans = "Not Weird";
}
}
//Complete the code
System.out.println(ans);
}
}