C program to identify whether a number is even or odd

 

C PROGRAM TO IDENTIFY WHETHER A NUMBER IS EVEN OR ODD

The best C programming app is Dev c++

The program to find that a number is even or odd is given below:-


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

OUTPUT:-

Enter a number:13
Odd Number
 




Thank you all -----

Follow my blog for more programming knowledge...

------------------x----------------------x-------------------------x------------------

 

Comments

Popular Posts