#include <iostream>
#include <vector>
bool find_minmax(std::vector<double> &numbers, double& min, double& max)
{
if (numbers.empty()) return false;
min = numbers[0]; max = numbers[0];
for (double x : numbers)
if (max < x)
max = x;
if (min > x)
min = x;
}
return true;