1import java.util.Scanner;
2
3class CheckEvenOdd
4{
5 public static void main(String args[])
6 {
7 int num;
8 System.out.println("Enter an Integer number:");
9
10 //The input provided by user is stored in num
11 Scanner input = new Scanner(System.in);
12 num = input.nextInt();
13
14 /* If number is divisible by 2 then it's an even number
15 * else odd number*/
16 if ( num % 2 == 0 )
17 System.out.println("Entered number is even");
18 else
19 System.out.println("Entered number is odd");
20 }
21}