#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
vector<int> v = {6, 5, 9, 8, 50, 311, 22};
// auto it = max_element(begin(v), end(v));
auto it = min_element(begin(v), end(v));
// cout << "Max Value is : "<<*it<<endl;
cout << "Min Value is : " << *it << endl;
return 0;
}
Posted inC++