From da84686c71bcbb5a5b6369d7b662653f7fb46459 Mon Sep 17 00:00:00 2001 From: victoriaCS Date: Sun, 4 May 2025 20:47:04 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D1=80=D0=B0=D0=B7=D0=B4=D0=B5=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80=D0=BE=D0=B3=D1=80=D0=B0?= =?UTF-8?q?=D0=BC=D0=BC=D1=8B=20=D0=BD=D0=B0=20=D1=84=D0=B0=D0=B9=D0=BB?= =?UTF-8?q?=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/main.cpp b/main.cpp index da8c434..a083677 100644 --- a/main.cpp +++ b/main.cpp @@ -1,19 +1,16 @@ #include #include +#include "svg.h" +#include "hictogram.h" using namespace std; -const size_t SCREEN_WIDTH = 80; -const size_t MAX_ASTERISK = SCREEN_WIDTH - 3 - 1; - - struct Input { vector numbers; size_t bin_count{}; }; -Input -input_data() { +Input input_data() { size_t number_count; cerr << "Enter number count: "; cin >> number_count; @@ -31,11 +28,9 @@ input_data() { return in; } -int -main() { +int main() { auto in = input_data(); auto bins = make_histogram(in.numbers, in.bin_count); - show_histogram_text(bins); + show_histogram_svg(bins); } -