• + 1 comment

    Solution.java:19: error: bad operand types for binary operator '<' if(2

    what is the issue in this code ? 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!=0){
              ans = "Weird";
            }
            else{
    
               if(2<n<5)
                   ans="weird";
                if(6<n<10)
                    ans="weird";
                if(n>20)
                    ans="not weird";
    
    
            }
            System.out.println(ans);
    
        }
    }