From 0e04d0dc01d24668d7995530eacaf8bae8a3f76c Mon Sep 17 00:00:00 2001 From: Artem Date: Mon, 8 Apr 2024 16:45:22 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B3=D0=B8=D1=81=D1=82=D0=BE?= =?UTF-8?q?=D0=B3=D1=80=D0=B0=D0=BC=D0=BC=D1=8B=20=D0=B2=D1=8B=D0=BD=D0=B5?= =?UTF-8?q?=D1=81=D0=B5=D0=BD=D0=BE=20=D0=B2=20=D1=84=D1=83=D0=BD=D0=BA?= =?UTF-8?q?=D1=86=D0=B8=D1=8E=20show=5Fhistogram=5Ftext?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/main.cpp b/main.cpp index f18187c..f117ecb 100644 --- a/main.cpp +++ b/main.cpp @@ -73,13 +73,7 @@ vector make_histogram(vector& numbers, size_t bin_count){ return bins; } - - -int -main() -{ - auto in = input_data(); - auto bins = make_histogram(in.numbers, in.bin_count); +void show_histogram_text(vector& bins){ size_t max_count = 0; for (size_t x: bins) { @@ -129,5 +123,13 @@ main() } } +} + +int +main() +{ + auto in = input_data(); + auto bins = make_histogram(in.numbers, in.bin_count); + show_histogram_text(bins); return 0; }