Friday, 17 May 2013

JAVA Find Number is Odd OR Even

class file_name{

        public static void main(String ar[]){


                      int s=4;

                      
                      if(s%2==0)
                      {
                                System.out.println("The Number is Even");
                       }else{
                                System.out.println("The Number is Odd");
                       }
        }
}


OutPut
--------------------------
The Number is Even

No comments:

Post a Comment