#include <iostream>\n#include <algorithm>\n\nint main() {\n  int arr[] = {1, 2, 4, 8, 16};\n\n  int n = sizeof(arr) / sizeof(arr[0]);\n  int min = *std::min_element(arr, arr + n); \n  int max = *std::max_element(arr, arr + n); \n\n  std::cout << "Minimum: " << min << "\\n";\n  std::cout << "Maximum: " << max << "\\n";\n\n  return 0;\n}
Generate a C++ program to find the minimum and maximum value of a given array?