ProAnswers.org

Write a C program to find out the Greatest of two Numbers Using Conditional Operator ?

#include

#include



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();



}



[b]Output: [/b]



enter the two numbers



6



3



a is greater