hello friends....
TAKE THE FIRST STEP TO KNOWLEDGE FRIENDS BECAUSE KNOWLEDGE IS FREE.
>> /* WRITE A PROGRAM TO SELECT & PRINT THE LARGEST OF THE THREE NUMBER BY USING NESTED-IF-ELSE STATEMENT */
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("enter any three value : \n");
scanf("%d%d%d",&a,&b,&c);
if(a>b)
{
if(a>c)
printf("largest value : %d\n",a);
else
printf("largest value : %d\n",c);
}
else
{
if(b>c)
printf("largest value : %d\n",b);
else
printf("largest value : %d\n",c);
}
getch();
}
/* OUTPUT */
===========================
enter any three value :
20
50
10
largest value : 50
* * * * * * * * * * * * * *http://www.dnpdeveloper.com
if you have like this blog so share and subscribe, comment for this blog.
if your any question, so comment pleass.
MY INSTAGRAM ID : dnp176
Comments
Post a Comment