Find the greater of the three numbers
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
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Flowchart:
Algorithm:-
· start
· input numbers
· check condition if(n1>=n2&&n1>=n3) it is true then display n1 largest
· if(
Code:
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer