From d0672ba7ce043738a8871515bae7988c84ae5de5 Mon Sep 17 00:00:00 2001 From: SneguraDS Date: Mon, 6 May 2024 14:35:16 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5?= =?UTF-8?q?=D1=82=D1=80=D0=B0=20=D0=B2=20input=5Fdata?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 9705337..ab81cdc 100644 --- a/main.cpp +++ b/main.cpp @@ -11,7 +11,7 @@ struct Input { size_t max_count{}; }; Input -input_data() { +input_data(istream& cin) { Input in; cerr << "Enter number count: "; cin >> in.number_count; @@ -30,7 +30,7 @@ input_data() { } int main() { - auto in = input_data(); + auto in = input_data(cin); auto bins = make_histogram(in.numbers, in.bin_count, in.number_count, in.max_count); show_histogram_svg(bins, in.max_count, in.bin_count); return 0;