Bhuvan InfoTech Android App

Download our Android App and browse Technical News, Projects, Computer Tricks more easily with lots of Interesting Features.

Tuesday, June 14, 2016

Find largest value among three variable using conditional operator | C program

#include<stdio.h>
int main()
{
 int a;
 int b;
 int c;
 int d;
 printf("Enter values of A,B and C : ");
 scanf("%d %d %d",&a,&b,&c);
 d=(a>=b?a>=c?a:c:b>=c?b:c);
 printf("largest value : %d",d);
 return 0;
}
Bhuvan Arora

No comments:

Amazing Deal !