#ifndef HISTOGRAM_INTERNAL_H_INCLUDED #define HISTOGRAM_INTERNAL_H_INCLUDED void find_minmax(const std::vector& numbers, double& Min, double& Max) { Min = numbers[0]; Max = numbers[0]; for(size_t x : numbers) { if(x < Min) { Min = x; }else { if(x > Max) { Max = x; } } } } #endif // HISTOGRAM_INTERNAL_H_INCLUDED