sort c++
#include <iostream>
#include <vector>
#include <algorithm>
int main() {
// Create a vector of integers
std::vector<int> numbers = {5, 2, 8, 3, 1};
// Use the sort function from the algorithm library to sort the vector
std::sort(numbers.begin(), numbers.end());
// Print the sorted vector
std::cout << "Sorted Numbers: ";
for (int number : numbers) {
std::cout << number << " ";
}
return 0;
}