Horje
c program to find minimum of 5 numbers using conditional operator in c Code Example
c program to find minimum of 5 numbers using conditional operator in c
//C program to find Smallest among five numbers using ternary operator

#include<stdio.h>

void main()
{
  // Variable declaration
   int a,b,c,d,e,small;

   printf("Enter five number\n");
   scanf("%d %d %d %d %d",&a,&b, &c, &d, &e);

 // Smallest among a, b, c and d
   small = ( (a<b && a<c && a<d && a<e) ? a : (b<c && b<d && b<e) ? b : (c<d && c<e)? c : (d<e)? d : e );

 //Display Smallest number
   printf("Smallest Number is : %d",small);

}




C

Related
PDO Crud Code Example PDO Crud Code Example
esp32 dhcp server Code Example esp32 dhcp server Code Example
google sheets transpose new line to table Code Example google sheets transpose new line to table Code Example
My name is c Code Example My name is c Code Example
lateinit kotlin Code Example lateinit kotlin Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9