/* Program to find the given number is odd or even using not operator */
#include "stdio.h"
#include "conio.h"
main()
{
	int value,answer;
	printf ("enter the value\n");
	scanf("%d",&value);
	answer=value % 2;
	if (!answer)
	   printf(" %d is even",value);
	else
	   printf(" %d is odd ",value);
	getch();
}

/*
   Note: if (!answer) means (answer==0) then the value is even
					else the value is odd
	 if (answer)  means (answer!=0) then the value is odd
					else the value is even
*/