find the mminimum of the vector and its position in c++
#include <iostream>
#include <vector>
#include <algorithm>
int main() {
std::vector<int> vec = {10, 5, 8, 3, 12};
auto minPosition = std::min_element(vec.begin(), vec.end()) - vec.begin();
int minValue = *std::min_element(vec.begin(), vec.end());
std::cout << "Minimum value: " << minValue << std::endl;
std::cout << "Position of minimum value: " << minPosition << std::endl;
return 0;
}