Write the program to check the number is Even or Odd :-


//Program to check num. is Even or Odd

#include<stdio.h>
#include<conio.h>
void main()
{
int m;
printf("Enter any number:");
scanf("%d",&m);

if(m%2==0)
{
printf("The number is Even");
}

else
printf("The number is Odd");

getch();
}

Output:


Enter any number:2486
The number is Even

			

Previous Next