Question: * I want to make algo of this program!* include int main() { int a,b,c; printf( Enter three numbers: ); scanf( %d%d%d,&a,&b,&c); if(a>b&&a>c) { if(b>c)
*I want to make algo of this program!*
include
int main()
{
int a,b,c;
printf(" Enter three numbers: ");
scanf(" %d%d%d",&a,&b,&c);
if(a>b&&a>c)
{
if(b>c)
{
printf(" %d is the 2nd largest number",b);
}
else
{
printf("%d is the 2nd largest number",c);
}
}
else if(b>a&&b>c)
{
if(a>c)
{
printf(" %d is the 2nd largest number",a);
}
else
{
printf("%d is the 2nd largest number",c);
}
}
else if(c>a&&c>b)
{
if(a>b)
{
printf("%d is the 2nd largest number",a);
}
else
{
printf("%d is the 2nd largest number",b);
}
}
return 0;
}
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
