Vector-Sort

  • + 0 comments

    include

    include

    include

    include

    include

    using namespace std;

    int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */

    vector<int> v;
    int size{};
    int num{};
    
    cin >> size;
    
    while(cin >> num)
    {
        v.push_back(num);
    }
    
    sort(v.begin(), v.end());
    
    for(auto i : v)
    {
        cout << i << " ";
    }
    
    return 0;
    

    }