February 4, 2011

C Program to find out Maximum of 3 number’s using Conditional Operator


//C Program to find out Maximum of 3 number’s using Conditional Operator
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter 3 nos:\n \n");
scanf("%d%d%d",&a,&b,&c);
(a>b)?((a>c)?printf("a is max"):printf("c is max")):((b>c)?printf("b is max"):printf("c is max"));
getch();
}

Hope you liked my posts, give comments if you have any doubts.. :)

Related Posts :



Categories:

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Related Posts with Thumbnails