#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
int n=9;
int a[]={-5,2,-7,-2,8,4,6,1,3};
// sort(a,a+n);
for(int i=0;i<n;i++){
for(int j=1;j<n;j++){
if(a[j-1]>a[j]){
int temp=a[j-1];
a[j-1]=a[j];
a[j]=temp;
}
}
}
vector<int> b;
for(int i=n-1;i>n-1-3;i--){
b.push_back(a[i]);
}
for(int i=0;i<b.size();i++){
cout<<b[i]<<" ";
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: