C Program to Check Whether the Number is Even or Odd

//Program to check whether the number is even or odd
#include<stdio.h>
void main()
{
int n;
printf(“enter the value of n\n”);
scanf(“%d”,&n);
if(n%2)
{
printf(“%d is odd”,n);

}
else
{
printf(“%d is even”,n);
}
}

OUTPUT

Leave a Reply

Your email address will not be published.