Beginner Java Program - All Numbers Entered Showing as Odd
<p>I am taking a class on Java and the program I am working on is suppose to ask for a number and then show whether it is odd or even, all numbers show as odd. Here is the code:</p>

<pre><code>import java.util.Scanner;

    Scanner scan = new Scanner(System.in);       
    int input, result;

    System.out.print("Enter an integer number: ");
    input = Integer.valueOf(scan.nextLine());//Needed to make the scan of the
    //produce a integer rather than a string.

    result = input % NUM;//Orgininal coder forgot ";" ending. Syntax type. 

    if (result == 0) {
        System.out.println("\n\n Number " + input + " is odd.");
    }
    else if (result != 0) {
        System.out.println("\n\n Number " + input + " is even.");
    }
  }    
}
</code></pre>

<p>Any help is appreciated? I am just learning java.</p>