answersLogoWhite

0


Best Answer

void main()

{

int a,b,c;

clrscr();

printf("Enter the value of a:");

scanf("%d",&a);

printf("\nEnter the value of b:");

scanf("%d",&b);

printf("\nEnter the value of c:");

scanf("%d",&c);

if(a>b)

{

if(a>c)

{

if(b>c)

{

printf("c is smallest\n");

printf("b is middle\n");

printf("a is largest\n");

}

else

{

printf("b is smallest\n");

printf("c is middle\n");

printf("a is largest\n");

}

}

else

{

printf("b is smallest\n");

printf("a is middle\n");

printf("c is largest\n");

}

}

else

if(b>c)

{

if(a>c)

{

printf("c is smallest\n");

printf("a is middle\n");

printf("b is largest\n");

}

else

{

printf("a is smallest\n");

printf("c is middle\n");

printf("b is largest\n");

}

}

else

{

printf("a is smallest\n");

printf("b is middle\n");

printf("c is largest\n");

}

getch();

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program to find the largest of three numbers and print the output in ascending order?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is accuracy of a good program?

It depends on to what level of accuracy you tend to have with the output of your program Accuracy can be treated as: (Desired Output / Actual Output of your Program)


PHP program to find the minimum number among a list?


Which documentation is typically written first input output internal program or external program?

Output documentation


Write a program to find the largest of n numbers in c?

Without Using Arrays Program: #include<stdio.h> main() { int n,m,i,max; printf("How many numbers(n) you going to enter:"); scanf("%d",&n); printf("Enter the numbers:"); scanf("%d",&m); max=m; for(i=2;i<=n;i++) { scanf("%d",&m); if(m>max) max=m; } printf("The Largest Number is %d",max); } Output: How many numbers(n) you going to enter:5 Enter the numbers: 25 410 362 5 56 The Largest Number is 410 With Using Arrays Program: #include<stdio.h> #include<conio.h> void main() { int max_num(int a[],int n); int max,i,n; int a[50]; clrscr(); printf("Enter n number:"); scanf("%d",&n); printf("Enter the numbers:"); for(i=0;i<n;i++) scanf("%d",&a[i]); max=max_num(a,n); printf("The largest number is %d",max); getch(); } int max_num(int a[],int n) { int i,m=0; for(i=0;i<n;i++) { if(a[i]>m) m=a[i]; } return m; } output: Enter n number:10 Enter the numbers: 123 456 789 963 852 147 5 56 600 753 The largest number is 963


What is input -output bound program?

input output bound program is a program (or process in precise way), which spends most of time allocated to it for execution, on input/output devices and need very small CPU time for it.


What is the quantity of output of this equation The numbers are not filled and you have to answer the numbers for the dollar signs and to do this you have to use the quantity of output formula.$$$10?

The answer is the quantity of the two numbers


Can A Computer Output Electricity In Computercraft you can say if true output power on this side Can you say in a program to output power say to light a light So if true then output power to led's?

A Computer Output Electricity in Computercraft cannot be said to make a program to output power, regardless of the side.


How do you append a output of a program to a program?

you mean like show some sample output? Just put it in comments at the bottom. Run the program, and in the top left of the command prompt there is a button you can click. Select mark, highlight the output, then select copy. Paste it onto the end of the program.


What is a extra copie of a document or a program?

It is an output!


How do you write a program with do while loop so that the output is 123456 equals 720?

How do you write a program with do while loop so that the output is 123456 =720


What are the two parts of compilation?

1) source program to object program 2)object program to object program output


What are the Example Output of Calculator Program in C plus plus?

example output of c++ calculator