Q:

Find the greater of the three numbers

0

Find the greater of the three numbers

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Flowchart:

    Algorithm:-

·        start

·        input numbers

·        check condition if(n1>=n2&&n1>=n3) it is true then display n1 largest

·        if(

         Code:

#include<stdio.h>
#include<conio.h>
int main()
{
Int n1,n2,n3;
Printf(“Enter three numbers:”);
Scanf(“%d%d%d”,&n1,&n2,&n3);
If(n1>=n2)
{
If(n1>=n3)
Printf(“\n n1 largest”);
else
printf(“\n n3 largest”);
}
else
{
If(n2>=n3)
Printf(“\n n2 largest”,n2);
else
{
Printf(“\n n3 largest”,n3);
}
return 0;
}

Output:

Enter three number: 10 20 30

n3 largest

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C Programming Exercises With Solutions

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Write a program in c to type casting implicit expl... >>
<< Write a program in c to function to check lowercas...