From 58e8c30d674a34d7d95228fe08214f5c15d0e570 Mon Sep 17 00:00:00 2001 From: "PARZIVAL (BreganIM)" Date: Mon, 14 Apr 2025 00:43:00 +0300 Subject: [PATCH] =?UTF-8?q?code:=D0=A4=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D1=8F?= =?UTF-8?q?=20=D0=BF=D0=BE=D0=B8=D1=81=D0=BA=D0=B0=20=D0=BC=D0=B8=D0=BD?= =?UTF-8?q?=D0=B8=D0=BC=D1=83=D0=BC=D0=B0=20=D0=B8=20=D0=BC=D0=B0=D0=BA?= =?UTF-8?q?=D1=81=D0=B8=D0=BC=D1=83=D0=BC=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- laba01upd3.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/laba01upd3.cpp b/laba01upd3.cpp index 1a1ad02..4487bde 100644 --- a/laba01upd3.cpp +++ b/laba01upd3.cpp @@ -29,6 +29,17 @@ Input input_data() { return in; } +void find_minmax(const vector& numbers, double& min, double& max) { + min = numbers[0]; + max = numbers[0]; + for (double x : numbers) { + if (x < min) + min = x; + if (x > max) + max = x; + } +} + int main() {