write
a
Java script code to find
the odd and even
number.
Answers
Answered by
1
Answer:
jdksksksuuwo29bzk873mlzoal
Explanation:
jkslssjsnahfkg
Answered by
1
Answer:
this is the code to find a java script that the number is odd or even
const number = 6;
const result = number % 4; // 2
*coding of Java:
// program to check if the number is even or odd
// take input from the user
const number = prompt("Enter a number: ");
//check if the number is even
if(number % 2 == 0) {
console.log("The number is even.");
}
// if the number is odd
else {
console.log("The number is odd.");
}
Output:
Enter a number: 5
The number is odd.
so dear this output gives that the number is odd.
Similar questions
Computer Science,
2 months ago
Computer Science,
2 months ago
Math,
4 months ago
Social Sciences,
4 months ago
English,
9 months ago
Math,
9 months ago