C program to check whether a given number is Even or Odd

//C program to check whether a given number is Even or Odd:-


#include <stdio.h>
#include<conio.h>
void main()
{
int number;
clrscr();
printf("Enter an integer number: ");
scanf("%d",&number);
   if(number % 2 == 0)
     {
     printf("%d is Even Number",number);
     }
   else
    {
    printf("%d is Odd Number:", number);
    }
getch();
}

=====================

OUTPUT:-

Enter an integer number: 6
6 is Even Number                                                               
                                                                               
=========================                                                                               
C program to check whether a given number is Even or Odd

Comments