Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

odd even condition

let number = 15;
if(number % 2 ==0){
	console.log( number + 'is  Even Number');
}
else{
	console.log(number " is Odd Number");
}
Comment

odd or even checker

a = int(input("Enter the number: "))
if (a % 2) == 0:
    print("{0} is even".format(a))
else:
    print(" {0} is odd ".format(a))
Comment

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);
     }
}
Comment

odd and even

Numbers -- odd & even
Write a method which can identifies given number is even or odd 
EX: 
identify(5) ->  "Odd"   
identify(6) ->  "Even"
 
Solution :
public  static  String  identifyOddEven( int  n ) {
return  n%2==0 ? "Even" : "odd" ; 
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: map js 
Javascript :: es6 closures 
Javascript :: JQuery Autocomplete no result found 
Javascript :: querySelectorAll multiple lists 
Javascript :: angular print html 
Javascript :: JavaScript try...catch Statement 
Javascript :: change profile photo with javascript 
Javascript :: Material-ui wallet icon 
Javascript :: numeros que mais se repetem em um array 
Javascript :: expo location background example 
Javascript :: react-datepicker float position 
Javascript :: ABORT CONTROLLER WITH ASYNC USEEFFECT REACT 
Javascript :: js check if array contains value 
Javascript :: convert string to regular expression js 
Javascript :: export default module 
Javascript :: supertest formdata 
Javascript :: xslt remove node 
Javascript :: ease between 2 points 
Javascript :: javascript push array 
Javascript :: js email validation 
Javascript :: nextjs override page route 
Javascript :: How to write on a web page javascript 
Javascript :: render text in for loop react in function 
Javascript :: Event Custom Fire 
Javascript :: send message to user facebook game 
Javascript :: javascript target closest id 
Javascript :: How to concatenate two textbox values in JavaScript 
Javascript :: javascript max characters string function 
Javascript :: how to make lines glow canvas 
Javascript :: export to csv - Javascript - Download CSV as File 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =