without using conditional statement find even or odd

This tip submitted by ABDUL RIZWAN on 2013-03-24 13:24:56. It has been viewed 6126 times.
Rating of 5.5 with 30 votes



#include
#include

void main()
{
int num;
clrscr();
printf("Enter any number: ");
scanf("%d",&num);
num%2==0&&printf("EVEN")||printf("ODD");
getch();
}



More tips

Help your fellow programmers! Add a tip!