Vector-Sort

  • + 0 comments
    int n;
        cin >> n;
    
        vector<int> numbers(n);
        for (int i = 0; i < n; i++) {
            cin >> numbers[i];
        }
    
        sort(numbers.begin(), numbers.end());
    
        for (int i = 0; i < n; i++) {
            cout << numbers[i] << " ";
        }
        cout << endl;