From 279ed6d725586b526db7c64728b3deeb2546d108 Mon Sep 17 00:00:00 2001 From: "Senya (YershovArA)" Date: Mon, 22 May 2023 11:10:17 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=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?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lab_01.cbp | 8 ++++++++ main.cpp | 30 ++++++++---------------------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/lab_01.cbp b/lab_01.cbp index ad91226..2a79add 100644 --- a/lab_01.cbp +++ b/lab_01.cbp @@ -32,10 +32,18 @@ + + + + + + + diff --git a/main.cpp b/main.cpp index 65ab87e..574debd 100644 --- a/main.cpp +++ b/main.cpp @@ -1,16 +1,18 @@ #include #include +#include +#include "histogram.h" using namespace std; struct Input { - vector numbers; - size_t bin_count{}; + vector numbers; + size_t bin_count{}, number_count{}; }; -Input input_data() { +Input input_data(){ size_t number_count, bin_count; cin >> number_count; Input in; @@ -25,30 +27,14 @@ Input input_data() { int main() { - Input in = input_data(); - double min, max; - find_minmax(in.numbers, min, max); - -} + auto in = input_data(); + auto bins = make_histogram(in.numbers, in.bin_count); +} -void find_minmax(vector& numbers, double& min, double& max) { -auto counts=numbers.size(); -int i; -min = number[0]; -max = number[0]; -for (i=0; i maxx) { - max = number[i]; -} -} -}