#include <iostream.h>
int main()
{
int a[6] = {5,19,11,18,27,22};
int j;
for(j=4;j>=0;j--)
for(int i=0;i<=j;i++)
{
if(a[i] < a[i+1])
{
int tmp = a[i];
a[i] = a[i+1];
a[i+1] = tmp;
}
}
for(j=0;j<6;j++)
cout << a[j] << " " ;
cout << endl;
}
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2009
(46)
-
▼
January
(13)
- Wipeer set as default page for new tabs in firefox
- Some useful vim commands
- launching multiple commands(applications) from a b...
- command for traceroute on windows
- Oracle 10g username password
- flex sorting a datagrid column numerically rather ...
- flex datagrid restricting a column to have numeric...
- flex datagrid with total max average etc
- Inverse ,determinant ,adjoint for NxN matrix
- Bunch tag
- C code for selection Sort
- C code for insertion sort
- C code for bubble sort
-
▼
January
(13)
No comments:
Post a Comment