C Program to Check Whether a given Number is Even or Odd

Write a C program to check whether a given number is even or odd.

C program to check even or odd

/* Aim: To Find whether the number is even or odd */

int main()
	int a;
	printf("\n Enter Your number:");

	if (a%2==0)
		printf("\n %d is even number \n \n",a);
		printf("\n %d is odd number \n \n",a);
	return 0;


 Enter Your number:2

 2 is even number