title: Conditional Statement on Java7
body: <p>Hello i just started a coding exercise on hackerrank and i am having a little challenge using scanner class with the skip function. here is what i have tried.
  Objective 
  In this challenge, we're getting started with conditional statements. Check out the Tutorial tab for learning materials and an instructional video!</p>
  
  <p>Task </p>
  
  <p><em>Given an integer, perform the following conditional actions:</em></p>
  
  <ul>
  <li>If n is odd, print Weird</li>
  <li>If n is even and in the inclusive range of 2 to 5, print Not Weird</li>
  <li>If n is even and in the inclusive range of 6 to 20, print Weird</li>
  <li>If n is even and greater than 20, print Not Weird</li>
  <li>Complete the stub code provided in your editor to print whether or
  not n is weird.</li>
  </ul>
  
  <p>Input Format</p>
  
  <blockquote>
    <p>A single line containing a positive integer,n.</p>
  </blockquote>
  
  <p>Constraints</p>
  
  <p>Output Format</p>
  
  <blockquote>
    <p>Print Weird if the number is weird; otherwise, print Not Weird.</p>
  </blockquote>
  
  <pre><code>import java.io.*;
  import java.math.*;
  import java.security.*;
  import java.text.*;
  import java.util.*;
  import java.util.concurrent.*;
  import java.util.regex.*;
  
  public class Solution {
  
  
      private static final Scanner scanner = new Scanner(System.in);
  
      public static void main(String[] args) {
          int N = scanner.nextInt();
  
          if (N % 2 == 0 &amp;&amp; N &gt;= 2 &amp;&amp; N &lt;= 5 &amp;&amp; N &gt; 20) {
              System.out.println("not weird");
  
          } else if (N % 2 == 0 &amp;&amp; N &gt;= 6 &amp;&amp; N &lt;= 20) {
              System.out.println("weird");
          } else {
              System.out.println("weird");
          }
  
          scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");
  
  
          scanner.close();
      }
  }
  </code></pre>
  
  <p>Please what am i doing wrong.</p>