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 the purpose of sprintf() function?

1134


regarding pointers concept

2050


What is an lvalue in c?

1132


What are the types of data files?

1207


Explain the properties of union.

1088


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

1351


What is the purpose of main( ) in c language?

1142


‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.

2350


When should I declare a function?

1148


Do you know pointer in c?

1059


Why is c so important?

1069


what is the difference between 123 and 0123 in c?

1209


cavium networks written test pattern ..

4087


Write a code of a general series where the next element is the sum of last k terms.

1044


Explain how do you determine the length of a string value that was stored in a variable?

1158