write a program that accepts 3 numbers from the user. dispaly
the values in a descending order.
Answer Posted / anupama shelke
#include<stdio.h>
#include<conio.h>
main()
{
int a[3],i,j,temp;
clrscr();
for(i=0;i<3;i++)
{
printf("\nEnter the values:");
scanf("%d",&a[i]);
}
for(i=0;i<3;i++)
{
for (j=i+1;j<3;j++)
{
if(a[i]<b[i])
{
temp=a[i];
a[i]=b[i];
b[i]=temp;
}
}
}
for(i=0;i<3;i++)
{
printf("array is:%d",a[i])
}
getch();
return;
}
| Is This Answer Correct ? | 3 Yes | 5 No |
Post New Answer View All Answers
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
How can you be sure that a program follows the ANSI C standard?
Are negative numbers true in c?
List the difference between a While & Do While loops?
Explain the difference between getch() and getche() in c?
What is a string?
what do you mean by enumeration constant?
Apart from dennis ritchie who the other person who contributed in design of c language.
In c programming language, how many parameters can be passed to a function ?
What is wild pointer in c with example?
any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()
What is the difference between a string and an array?
Explain how do you declare an array that will hold more than 64kb of data?
What is keyword in c?
I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.