Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is quick sort in c?

1161


Why is C language being considered a middle level language?

1212


What is spark map function?

1210


Between macros and functions,which is better to use and why?

2323


What is a memory leak? How to avoid it?

1425


What does *p++ do? What does it point to?

1124


Explain 'bus error'?

1166


Explain what are binary trees?

1131


write a program to generate address labels using structures?

4625


In c language can we compile a program without main() function?

1179


When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?

1119


What are register variables in c?

1051


Do you know the purpose of 'register' keyword?

1070


When is the “void” keyword used in a function?

1583


Explain what is the best way to comment out a section of code that contains comments?

1191