Write a program in C to find largest of given three numbers using AND operator.
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c,lar;
clrscr();
printf("Enter threee numbers:-");
scanf("%d%d%d",&a,&b,&c);
if(a>b&&a>c)
lar=a;
else if(b>c)
lar=b;
else
lar=c;
printf("%d is largest no.",lar);
getch();
}
Output:
C program to find largest of given three numbers using nested if
C program to find largest of given three numbers using AND operator
0 Comments