Answers for "min element in stl c++"

C++
0

min element in stl c++

#include <bits/stdc++.h>
using namespace std;
int main()
{
  	vector<int> v{ 9, 4, 7, 2, 5, 10, 11, 12, 1, 3, 6 };
	int c = *min_element(v.begin(), v.end());
  
    cout<<"Min Element of the vector is "<< c;
    return 0;
}
Posted by: Guest on August-13-2021

Browse Popular Code Answers by Language