Write a program in C to find the greatest of two numbers using conditional operator
#include <stdio.h>
#include <conio.h>
void main()
{
int a,b;
clrscr();
printf(“enter the 2 numbers”);
scanf(“%d%d”,&a,&b);
(a>b?printf(“a is greater”):printf(“b is greater”));
getch();
}
Post a Comment