Odd or even in Php. Here’s the script which helps you to find the number is odd or even. This program will check the number whether it is odd number or even number in php

<?php

$num=100;

if($num%2==0)

{

echo "$num is Even num";

}

else

{

echo "$num is Odd num";

}

?>

Output:

100 is Even num

#### Odd or Even Number in PHP

A number that can be divided into two equal groups is called an even number. A number that cannot be divided into two equal groups is called an odd number.

Even numbers, regardless of how many digits they contain, end in 2, 4, 6, 8, and 0; we know the number 5,917,624 is even since it ends in a 4!.

When two odd numbers are added together, the result is always even.

When two or more odd integers are added together, the result is always odd.

An even number of odd numbers adds up to an even amount, while an odd number of odd numbers adds up to an odd sum.

Even numbers are more appreciated and viewed as calmer and nicer than odd numbers, thus it’s remarkable that our favourite number is 7, an odd number.

In fact, according to my poll, odd numbers are far more popular than even numbers. Arithmetic determines our response.

Generate Random Number in C in Range

conio.h Header File Definition

Find Out Duplicate Number Between 1 to N Numbers in Java

How to Call a Method in Java From Another Class

C Program to Find Length of String Without Using strlen Function

fopen Function in C With Example

C++ Program to Find Grade of a Student Using If Else