Checking The Entered Number is Even Or Odd


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


Output:-
Enter two Numbers2
Number Is even

Comments

Popular posts from this blog

Check whether the no entered is Palindrome or not

Calculate Factorial of a given no with help of Recursion

Find max. and min. element in the integer array