WAP that finds whether a given 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("The given number is EVEN");
else
printf("The given number is ODD");
getch();
}
Output
Enter any number: 10
The given number is EVEN


0 Comments