//program to know a number is even or odd
#include<stdio.h>
#include<conio.h>
void main()
{
int x;
printf("enter a number\n");
scanf("%d",&x);
if(x%2==0)
{
printf("it is an even number");
}
else
{
printf("it is an odd number\n");
}
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int x;
printf("enter a number\n");
scanf("%d",&x);
if(x%2==0)
{
printf("it is an even number");
}
else
{
printf("it is an odd number\n");
}
getch();
}