From 3fcd5ab84096866f34690dbdbf110b9aadfebe2e Mon Sep 17 00:00:00 2001 From: PodolskyNK Date: Wed, 8 May 2024 01:19:49 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=B5?= =?UTF-8?q?=D0=BC=20=D0=B3=D0=B8=D1=81=D1=82=D0=BE=D0=B3=D1=80=D0=B0=D0=BC?= =?UTF-8?q?=D0=BC=D1=83=20=D0=BE=D1=82=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=BE?= =?UTF-8?q?=20(2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cs-lab34.cbp | 4 ++++ histogram.cpp | 6 ++---- histogram.h | 2 ++ main.cpp | 1 - 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cs-lab34.cbp b/cs-lab34.cbp index 49b0653..00fdc54 100644 --- a/cs-lab34.cbp +++ b/cs-lab34.cbp @@ -32,6 +32,10 @@ + + + diff --git a/histogram.cpp b/histogram.cpp index 8533f35..9ec9340 100644 --- a/histogram.cpp +++ b/histogram.cpp @@ -1,5 +1,5 @@ #include "histogram.h" - +using namespace std; static void find_minmax(const vector& numbers, double& min, double& max) { min = numbers[0]; @@ -16,9 +16,7 @@ static void find_minmax(const vector& numbers, double& min, double& max) } } } - -vector -make_histogram(const vector& numbers, size_t& bin_count) +vector make_histogram(const vector& numbers, size_t& bin_count) { double min = 0; double max = 0; diff --git a/histogram.h b/histogram.h index d152317..a521200 100644 --- a/histogram.h +++ b/histogram.h @@ -1,8 +1,10 @@ #ifndef HISTOGRAM_H_INCLUDED #define HISTOGRAM_H_INCLUDED + #include std::vector + make_histogram(const std::vector& numbers, size_t bin_count); #endif // HISTOGRAM_H_INCLUDED diff --git a/main.cpp b/main.cpp index 2d4a82a..04c7403 100644 --- a/main.cpp +++ b/main.cpp @@ -25,7 +25,6 @@ input_data() { return in; } - void show_histogram_text(const vector& bins, size_t& bin_count) { const size_t SCREEN_WIDTH = 80;