Program to check a number is even or odd using conditional operator

Logic of the Program:

A number which is divisible by 2 is a even number.

Example: 24

Sample Input
Enter an integer 45
Sample Output
It is an Odd number

 

You may also like...