#include <algorithm>
#include <iostream>
#include <vector>
int main()
{
std::vector<int> v{3, 1, 4, 1, 5, 9};
std::vector<int>::iterator result = std::min_element(v.begin(), v.end());
std::cout << "min element at: " << std::distance(v.begin(), result);
}
#include <iostream>
using namespace std;
int main() {
int n;
cout <<"How many element yo will enter?"<<endl;
cin >> n;
int arr[n];
for(int i=0;i<n;i++){
cout << "Your "<< i+1 <<" number : ";
cin >> arr[i];
}
for(int i=0;i<n;i++){
if(arr[0]>arr[i]){
arr[0]>arr[i];
}
}
cout << "The min element is :"<<arr[0];
return 0;
}