C program to find ODD or EVEN number

#include<stdio.h>
#include<conio.h>
#include<math.h>

void main()
{
    int num;
    clrscr();

    printf("Enter the number = ");
    scanf("%d",&num);

    if((num%2)==0)
    {
        printf("Number is Even.");
    }
    else
    {
        printf("Number is Odd.");
    }

    getch();
}


Output:
Enter the number = 10
Number is Even.

Post a Comment

0 Comments