From 884fe64663e76a2fd8617e20bd6921702ba763a7 Mon Sep 17 00:00:00 2001 From: StepanovaKY Date: Mon, 5 May 2025 00:11:00 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D1=84=D0=B0=D0=B9=D0=BB=20=D0=BF=D1=80=D0=BE=D0=B5?= =?UTF-8?q?=D0=BA=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 main.cpp diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..b568345 --- /dev/null +++ b/main.cpp @@ -0,0 +1,43 @@ +#include +#include +#include "histogram.h" +#include "svg.h" + +using namespace std; + +struct Input{ + vector numbers; + size_t bin_count{}; + +} + + +Input input_data(){ + size_t number_count; + cerr<<"Enter number count:"; + cin >> number_count; + + Input in; + in.numbers.resize(number_count); + + for(size_t i=0; i>in.numbers[i]; + + } + + cerr<<"Enter bin count: "; + cin>>in.bin_count; + return in; +} + + + +int main(){ + + auto in = input_data(); + auto bins = make_histogram(in.numbers, in.bin_count); + show_histogram_svg(bins); + + +} +