/*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.. :)#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();
}
Categories:
c program
0 comments:
Post a Comment