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 1495 times.
Rating of 0.0 with 0 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!