Odd Even Number Script

Odd Even Number Script is used to find out if a number is odd or even.

Demo :

Type Number  

Example :

Type Number : 20

Type Number : 19

Following code is Odd Even Number Script code if you need to copy and use to your website.

  echo (1&$num) ? "Number is odd" : "Number is even";

In the above code used to find out if a number is odd or even.For odd numbers expressed in binary format, the least significant digit is always 1,whereas for even numbers, it is always 0. PHP's bitwise & operator returns 1 if both of its operands are equal to 1. Using these two principles, it's easy to create a conditional test for odd and even numbers.

Free Download Script :

If you need Odd Even Number Script click and download from following link.