Code to check number is even or odd

Code to check number is even or odd


#include<stdio.h>
#include<conio.h>
void main()
{
int a;
printf("Enter any number");
scanf("%d",&a);
if(a%2==0)
{
printf("It is an even number");
}
else
{
printf("It is an odd number");
}
getch();
}


Output



Comments

Popular posts from this blog

Code for pattern 6

Code to check leap year