My Subject Blog

C Program Find Minimum Value

/* Write a program to find minimum no out of three numbers by using Conditional Operator(nested..if ). */

#include <stdio.h>

int main(void) {
int a,b,c;
printf("Enter Three Values : ");
scanf("%d %d %d",&a,&b,&c);
printf("\n Minimum Value is : %d",((a<b)?(a<c?a:c):(b<c?b:c)));
return 0;
}

Comments

Most Visited Post

C Program to Find Largest Odd Number from Array

C Program for Runtime Memory Allocation for Table of Integers

Followers