/* write a program to find out the largest among three number by use Nested if*/
#include<stdio.h>
#include<conio.h>
void main()
{ int a,b,c;
clrscr();
printf("\n Enter three number = ");
scanf("%d%d%d",&a,&b,&c);
if(a>b)
{ if(a>c)
printf("%d is largest" ,a);
else
printf("%d is largest" ,c);
}
else
{ if(b>c)
printf("%d is largest" ,b);
else
printf("%d is largest" ,c);
}
getch();
}
/* Output :---
Enter three number = 56
20
7
56 is largest .
*/
👇💬ðŸ’😊👌
No comments:
Post a Comment
This Blog helps you to learn basics to high level programming coding and practicals.
conceptual understanding