From 6cf4e585f5e4729947fadfb959470389e26516ec Mon Sep 17 00:00:00 2001 From: OgarkovIA Date: Sun, 29 Sep 2024 11:37:55 +0000 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B8=D1=82=D1=8C=20'm?= =?UTF-8?q?ain.cpp'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 main.cpp diff --git a/main.cpp b/main.cpp deleted file mode 100644 index cb09681..0000000 --- a/main.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include -#include -#include "histogram.h" -#include "svg.h" -#include - -using namespace std; - - struct Input { - vector numbers; - size_t bin_count{}; - }; - -Input -input_data(istream& in, bool prompt){ - - if (prompt == true) cerr << "Enter number_count: "; - - size_t number_count; - in >> number_count; - - Input data; - data.numbers.resize(number_count); - - if (prompt == true) cerr << "Enter numbers: "; - - for (size_t i = 0; i < number_count; i++){ - in >> data.numbers[i]; - } - - if (prompt == true) cerr << "Enter bin count: "; - - in >> data.bin_count; - return data; -} - -int -main() -{ - curl_global_init(CURL_GLOBAL_ALL); - auto in = input_data(cin, false); - auto bins = make_histogram(in.numbers, in.bin_count); - show_histogram_svg(bins); - return 0; -}