Program to check whether a number is even or odd in c .

#include<stdio.h>
#include<conio.h>
int main()
{
   int num;
   print(“enter a number”);
   scanf(“%d”,&num);
   if(num%2==0)
      printf(“number is even”);
   else
      printf(“number is odd”);
   getch();
}

3 thoughts on “Program to check whether a number is even or odd in c .

Leave a Reply

Your email address will not be published.