/* Find largest value among three variable using conditional operator */
#include<stdio.h>
int main()
{
int a,b,c,d;
printf("Type 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("Greatest value : %d",d);
return 0;
}
Related Posts
Largest value among three variables
http://cbasicprogram.blogspot.in/2012/02/largest-value-among-three-variables.html
Largest among 3 variables using nested if
http://cbasicprogram.blogspot.in/2012/02/largest-among-3-variables-using-nested.html
#include<stdio.h>
int main()
{
int a,b,c,d;
printf("Type 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("Greatest value : %d",d);
return 0;
}
Related Posts
Largest value among three variables
http://cbasicprogram.blogspot.in/2012/02/largest-value-among-three-variables.html
Largest among 3 variables using nested if
http://cbasicprogram.blogspot.in/2012/02/largest-among-3-variables-using-nested.html
yahan aapko iska output bhi dena chahiye aur flow chart aur theory
ReplyDeletenice article for beginners.thank you.
ReplyDeletewelookups C++
javacodegeeks
Nice Program, to the point.
ReplyDeletethough i had to search for theory. I read the thoery from here first, then I understood better.
C language operator.
Nice article for beginners keep it up... Patterns in C
ReplyDelete