C Program To Check Whether the Number is Even or Odd

PROGRAM :

#include<stdio.h>
int main()
{
int a;
printf("Enter a number  \n");
scanf("%d",&a);
if(a%2==0)
{
    printf("\n%d is EVEN",a);
}
else
{
    printf("\n%d is ODD",a);
}
}




OUTPUT :

Enter a Number
42

42 is EVEN

Post a Comment

0 Comments