From f4321b02ee5b21c23e738e305c3610b9e4238a4b Mon Sep 17 00:00:00 2001 From: ShinkarenkoVA Date: Mon, 6 May 2024 16:26:28 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D1=86=D0=B2=D0=B5=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/main.cpp b/main.cpp index 1eee826..3e0fee2 100644 --- a/main.cpp +++ b/main.cpp @@ -11,8 +11,8 @@ using namespace std; struct Input { vector numbers; size_t bin_count{}; - string stroke; - string fill; + string colors_stroke; + string colors_fill; }; Input @@ -33,12 +33,10 @@ input_data(){ cerr << "Enter bin count: "; cin >> in.bin_count; + in.colors_stroke = "midnightblue"; + in.colors_fill = "deeppink"; - cerr << "Enter the color for the stroke: "; - cin >> in.stroke; - - cerr << "Enter the color to fill: "; - cin >> in.fill; + input_colors(in.colors_stroke, in.colors_fill); return in; } @@ -48,6 +46,6 @@ int main() auto in = input_data(); std::vector bins = make_histogram(in.numbers, in.bin_count); - show_histogram_svg(bins, in.stroke, in.fill); + show_histogram_svg(bins, in.colors_stroke, in.colors_fill); return 0; }