C Program to find the largest ( biggest or greatest or maximum ) among n integer numbers using Conditional ( ternary ) Operator

We can find the largest (biggest or greatest or maximum) of n integer numbers using Conditional (ternary) Operator. Now, We can write C Program to find the largest (biggest or greatest or maximum) among n integer numbers using Conditional (ternary) Operator. For example: if we input as 34, -67, 28, 12, 30, -43, 86, 24, 33, 75 then the largest (biggest or greatest or maximum) among n integer numbers is 86. The below given C program will find the largest (biggest or greatest or maximum) of n integer numbers using Conditional (ternary) Operator. Kindly check out the program to find largest (biggest or greatest or maximum) of n integer numbers.

Program to find largest of n integer numbers using Conditional (ternary) Operator.

#include<stdio.h>

int main()

{

int a, e, f, n;

clrscr();

printf(" How many integer numbers : ") ;

scanf("%d", &n);

printf(" Enter the %d integer numbers : ", n) ;

scanf("%d", &f) ;

for(a=1;a<=n-1;++a){

scanf("%d", &e) ;

f = (e > f? e : f);

}

printf("



The Largest among %d integer numbers using Conditional ternary Operator is : %d", n, f) ;

getch();

return 0;

}