Answer:
#include <iostream> // std::cout
#include <algorithm> // std::sort
#include <vector> // std::vector
using namespace std;
int main()
{
vector<int> myvector{ 8, 1, 3 };
std::sort(myvector.begin(), myvector.end());
for (int x : myvector)
cout << x << " ";
}
Step-by-step explanation:
Use STL libraries where you can to keep your code robust!