Program For Odd / Even

 public class Oe{
     public static void main(String args[]){
          int num1=45;
        if(num1%2==0){
         System.out.print("number is even");
          }else{
         System.out.print("number is odd");
         }
      }}

No comments:

Post a Comment

How to install java   How to add two numbers in java How to compile the program How to subtract two numbers in java How to multiply two numb...