#include
using namespace std;
bool compare(int a,int b){
return a>b;
}
int main(){
int n;
cout<<“Enter No. of Elements in Array”<<endl;
cin>>n;
int a[n];
for(int i=0;i<n;i++){
cin>>a[i]’’
}
sort(a,a+n,compare);
for(int i=0;i<n;i++){
cout<<a[i]<<endl;
}
return 0;
}
this is my code.It still arranges in Ascendig order not descending.