C program to check whether a given number is EVEN or ODD
Given an integer number and we have to check it is EVEN or ODD using C program.
The numbers which are divisible by 2 are EVEN numbers and which are not divisible by 0 are not as ODD numbers.
To check whether given number is EVEN or ODD, we are checking modulus by dividing number by 2, if the modulus is 0, then it will be completely divisible by 2 hence number will be EVEN or its will be ODD.
Input: Enter number: 12 Output: 12 is an EVEN number.
Input: Enter number: 19 Output: 19 is an ODD number.
C program to check EVEN or ODD
Outputneed an explanation for this answer? contact us directly to get an explanation for this answer