Showing posts with label Conditional Operator in C. Show all posts
Showing posts with label Conditional Operator in C. Show all posts

Monday, 23 February 2015

Conditional Operator in C


#include<stdio.h>
#include<conio.h>
main()
{
int a=-4;
clrscr();
printf("\n A Is      :%s",(a>0?"Positive":"Negative"));
printf("\n A Is      :%s",(a%2==0)?"Even":"Odd");
getch();
}