Task
Given an integer, , perform the following conditional actions:
Given an integer, , perform the following conditional actions:
- If is odd, print
- If is even and in the inclusive range of to , print
- If is even and in the inclusive range of to , print
- If is even and greater than , print
import java.io.*;
ReplyDeleteimport 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==0)
{
if(n==2 && n==4 )
{
ans = "Not Weird";
}
else if(n > 20)
{
ans = "Not Weird";
}
}
}
System.out.println(ans);
}
}