ADVT POST

Even Odd program java if else

EVEN ODD PROGRAM JAVA


public class c_ifelse_evenodd {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
int no=15;
        if(no%2==0)
        {
            System.out.println("Number is EVEN");
        }
        else
        {
            System.out.println("Number is ODD");
        }
    }

}




OUTPUT=NUMBER IS ODD


Share on Google Plus
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.