From 238fcef658918a8525fb099bddaaf2ffdb8d61ab Mon Sep 17 00:00:00 2001 From: LatyshevGI Date: Thu, 1 May 2025 19:01:36 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20histogram=5Finternal.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- histogram.cpp | 2 -- histogram_internal.h | 1 + main.cpp | 3 --- 3 files changed, 1 insertion(+), 5 deletions(-) create mode 100644 histogram_internal.h diff --git a/histogram.cpp b/histogram.cpp index 4b8b614..ae048fb 100644 --- a/histogram.cpp +++ b/histogram.cpp @@ -1,5 +1,4 @@ #include "histogram.h" - void find_minmax(vector vec, double& min, double& max) { min = vec[0]; max = vec[0]; @@ -13,7 +12,6 @@ void find_minmax(vector vec, double& min, double& max) { } } } - vector make_histogram(size_t number, vector vec) { vector bins(number); double mn, mx; diff --git a/histogram_internal.h b/histogram_internal.h new file mode 100644 index 0000000..819c07f --- /dev/null +++ b/histogram_internal.h @@ -0,0 +1 @@ +void find_minmax(std::vector vec, double& min, double& max); diff --git a/main.cpp b/main.cpp index f34eb01..af1c552 100644 --- a/main.cpp +++ b/main.cpp @@ -1,11 +1,9 @@ #include "histogram.h" #include "text.h" - struct Input { vector vec; size_t korz{}; }; - Input input_data() { Input in; size_t n, korz; @@ -20,7 +18,6 @@ Input input_data() { cin >> in.korz; return in; } - int main() { auto in = input_data(); auto bins = make_histogram(in.korz, in.vec);