Program to check given number is even or odd in c language.

#include<stdio.h>
#include<conio.h>
void main()
{
  int num;
  clrscr();
  printf("enter the number=");
  scanf("%d",&num);
  if(num%2==0)
  {
  printf("number is even.");
  }
  else 
  {
   printf("number iss odd.");
  }
  getch();
 }

■》 Output-> 

enter the number=6

number is even.

Comments

Popular posts from this blog

Introduction of java Programming language.

Stack data structure.