This is a basic program which checks whether the given number is even or odd.
PROGRAM :
PROGRAM :
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a;
printf("Enter any number to check Even Or Odd : ");
scanf("%d",&a);
if(a%2 == 0)
printf("%d is even",a);
else
printf("%d is odd",a);
return 0;
}
OUTPUT :| C - Even or Odd |