Program to show the use of conditional operator:
Program to show the use of conditional operator:
Program to show the use of conditional operator:
Program to show the use of conditional operator:
Program to show the use of conditional operator:
#include
#include
void main()
{
clrscr();
printf("enter value for a & b: ");
scanf("%d%d",&a,&b);
(a>b)?printf("a is greater"):printf("b is greater");
getch();
}
enter value for a & b: 5
7
b is greater
No comments:
Post a Comment