Write a Program to check number is Even or Odd

public class CheckEvenOdd{
     public static void main(String []args){
         int number = 12;
         if(number % 2 == 0)
         System.out.println(number +" is Even");
         else
         System.out.println(number +" is odd");
     }
}

Output: –

12 is Even

Leave a Reply

Your email address will not be published. Required fields are marked *