Search This Blog

Loading...

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.

No comments:

Post a Comment