C program to Find Biggest of 3 numbers using ternary operator

Previous
Next
#include <stdio.h>
int main()
{
	int a, b, c, big;
	
	printf("Enter 3 numbers :");
	scanf("%d%d%d" , &a, &b, &c);
	
	big = a>b && a>c ? a : b>c ? b : c ;
	printf("Biggest one is : %d \n", big);
	
	return 0;
}
Previous
Next

Add Comment

Courses Enquiry Form