# C Program To Find The Biggest Of Three Numbers Using Ternary Operator

C Program To Find The Biggest Of Three Numbers Using Ternary Operator. If you are looking for a C program to find biggest of 3 numbers example, this C programming tutorial will help you to learn how to write a program for finding the largest number in C. Just go through this C programming example to learn about finding the greatest number of three numbers.

## C Program to Find the Biggest of Three Numbers

Learn how to write a  c Program to find the biggest of three numbers. Writing ternary operator program in C can be done using various techniques but here in this program, we show how to write a finding largest number program in a proper way. Happy coding.

### C Program to Find the Biggest of Three Numbers – Source Code

You can copy paste the below C Program For Finding Biggest Number Using ternary operator, in c compiler to check how the source code work. Or write your own ternary operator C Program with the help of this below c programming tutorial.

Source Code:

```/* C PROGRAM TO FIND BIGGEST OF THREE NUMBERS - BIGGESTNUMBER.C*/

# include <stdio.h>
# include <conio.h>

void main() // program execution starts from here
{

int a, b, c, big ; //variable declaration
clrscr() ;

printf("Enter three numbers : ") ; //asking user to enter 3 numbers
scanf("%d %d %d", &a, &b, &c) ; //reading user entered 3 numbers

//Ternary operator code logic to find the biggest number
big = (a > b) ? ((a > c) ? a : c) : ((b > c) ? b : c) ;

printf("\nThe biggest number is : %d", big) ; //printing biggest number
getch() ;
}```

### C Program To Find Biggest Number – OUTPUT

After you compile and run the above c program to find biggest number using ternary operator, your C compiler asks you to enter the three numbers to find the largest number. After you enter a number, the program will be executed and give output.

Output:

Enter three numbers : 20    30      10

The biggest number is : 30