Program to find greatest in 2 numbers using conditional operator

Write a c Program to find greatest in 2 numbers using conditional operator

#include<stdio.h>
void main()
{

printf("enter value for a & b: \n);
scanf(“%d%d”,&a,&b);

(a>b)?printf("a is greater\n"):printf("b is greater\n");
}

Related Posts