Write a C++ program that will accept an input for the array size. Store the user input and sort array elements in ascending order.
Here is program:
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main()
{
int size;
cin >> size;
vector<int> arr(size);
sort(begin(arr), end(arr));
}
Comments
Leave a comment