#include <iostream>

#include<algorithm>

#include<vector>

using namespace std;

int main(){

    //initialize of int type

    vector<int>numbers = {3,2,4,5,1};

    //sort vector element in asceding order

    sort(numbers.begin(),numbers.end());

    for(int number:numbers){
        cout<<number<<" ";
    }
    return 0;
    

}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: