February 13, 2011

C Program to find maximum of 3 Numbers using Logical Operator


/*C Program to find max of 3 nos. using logical operator*/
#include<stdio.h>
#include<conio.h>
void main()
{
 int a,b,c;
// clrscr();
 printf("\n\nEnter The value of a,b,c\n\n");
 scanf("%d%d%d",&a,&b,&c);
 if((a>b)&&(a>c))
 {
 printf("a is maximum");
 }
 else
 {
 if ((b>a)&&(b>c))
 {
 printf("b is maximum");
 }
 else
 {
 printf("c is maximum");
 }
 }
 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