Friday, September 19, 2008

Smallest C code snippet to find whether number is odd or even

/*C program to find whether number is odd or even*/

void main()
{
int num;
scanf("%d",&num);
(num&1)= =1?printf("ODD"):printf("EVEN");
}

0 comments: