From 2416376b8be3c49bb860822f3a2080f14d405b70 Mon Sep 17 00:00:00 2001 From: "PARZIVAL (BreganIM)" Date: Mon, 5 May 2025 20:03:31 +0300 Subject: [PATCH] =?UTF-8?q?upd:=20=D0=97=D0=B0=D1=89=D0=B8=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- laba01upd3.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/laba01upd3.cpp b/laba01upd3.cpp index a0d1ed5..896ae34 100644 --- a/laba01upd3.cpp +++ b/laba01upd3.cpp @@ -1,7 +1,7 @@ - -#include +#include #include #include "histogram.h" +#include "histogram_internal.h" #include "svg.h" #include "text.h" #include @@ -33,9 +33,15 @@ Input input_data() { int main() { auto in = input_data(); + + double min_val, max_val; + find_minmax(in.numbers, min_val, max_val); + + double bin_size = compute_bin_size(in.numbers, in.bin_count); auto bins = make_histogram(in.numbers, in.bin_count); - show_histogram_svg(bins); - show_histogram_text(bins); + show_histogram_svg(bins, bin_size, min_val); + + show_histogram_text(bins); return 0; }