From a796205167fdafb7a054765d5990265382de8d30 Mon Sep 17 00:00:00 2001 From: ShinkarenkoVA Date: Mon, 29 Apr 2024 12:34:17 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=BF=D0=B5=D1=80=D1=81=D0=BE=D0=BD?= =?UTF-8?q?=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B=D0=B9=20=D0=B2=D0=B0=D1=80=D0=B8?= =?UTF-8?q?=D0=B0=D0=BD=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index edc3077..1eee826 100644 --- a/main.cpp +++ b/main.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include "histogram.h" #include "text.h" #include "svg01.h" @@ -10,6 +11,8 @@ using namespace std; struct Input { vector numbers; size_t bin_count{}; + string stroke; + string fill; }; Input @@ -30,6 +33,13 @@ input_data(){ cerr << "Enter bin count: "; cin >> in.bin_count; + + cerr << "Enter the color for the stroke: "; + cin >> in.stroke; + + cerr << "Enter the color to fill: "; + cin >> in.fill; + return in; } @@ -38,6 +48,6 @@ int main() auto in = input_data(); std::vector bins = make_histogram(in.numbers, in.bin_count); - show_histogram_svg(bins); + show_histogram_svg(bins, in.stroke, in.fill); return 0; }