Horje
c program to find minimum of 4 numbers using conditional operator in c Code Example
c program to find minimum of 4 numbers using conditional operator in c
//C program to find Smallest among four numbers using Conditional or ternary operator

#include<stdio.h>

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

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

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

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

}




C

Related
overhead computer science Code Example overhead computer science Code Example
or gmode inline image Code Example or gmode inline image Code Example
c program boilerplate code Code Example c program boilerplate code Code Example
Dynamic Memoray alocation For 2D Code Example Dynamic Memoray alocation For 2D Code Example
cum creez un nou nod how to create a new node Code Example cum creez un nou nod how to create a new node Code Example

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