#include<iostream.h>
#include<conio.h>
#include<algorithm>
template <class T>
void swap (T& a, T& b);
{
}
Rogue Wave Standard C++ Library User's Guide and Tutorial
const N=6;
main ()
{
int i,j;
int temp;
int number[N];
for (i=0;i<N;i++)
{
cout<<" enter " <<i<< " number :"<<endl;
cin >>number[i];
cout<<endl;
}
for (i=0;i<N-1;i++)
for (j=i+1;j<N;j++)
if (number [i]<number [j])
{
temp=number[i];
number[i]=number[j];
number[j]=temp;
swap(number[i],number[j];
}
for (i=0;i<N;i++)
cout<<number[i]<<" ";
getch();
}