New Want to Write for Computaholics ? if Yes Contact us at ""

Java program to find odd or even

Write a Java program to find odd or even | even odd program in java

/*java program to find the given number is even or odd */
import java.util.Scanner;

class EvenOrOdd
   public static void main(String args[])
      int xi;
      System.out.println("Enter an integer number to check if it is even or odd ");
      Scanner in = new Scanner(;
      i = in.nextInt();

      if ( i % 2 == 0 )
         System.out.println("Even number");
         System.out.println("Odd number");
Copyright © C Program | Java | OpenGL Programming | Hadoop at Computaholics