Check if number is even or odd - C Program

C program to check if entered number is even or odd.

Solution:

In this program, accept a number from user and check entered number is even or odd using condition:
Number mod(%) 2 equals to(==) zero.  

#include<stdio.h>
int main()
{
     int n;
     printf("Enter a Number : ");
     scanf("%d",&n);
     if(n%2==0)
          printf("\n%d is Even Number.",n);
     else
          printf("\n%d is Odd Number.",n);
     return 0;
}


Output:

even odd number