Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

odd or even

public class EvenOdd{
    public static void evenOddValue(int value) {
    if(value % 2 == 0){
        System.out.println("The given value is even: " + value);
    }
    else{
        System.out.println("The given value is odd: " + value);
    }
}
    public static void main(String [] args) {
        int num = 25;
        EvenOdd obj = new EvenOdd();
        obj.evenOddValue(num);
     }
}
Source by javahungry.blogspot.com #
 
PREVIOUS NEXT
Tagged: #odd
ADD COMMENT
Topic
Name
9+3 =