From 534cf3031d9a9a0c9007b84b3ced993c95ca0f45 Mon Sep 17 00:00:00 2001 From: NenashevaAV Date: Sat, 17 May 2025 15:40:10 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=D0=B8=20=D0=BD=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=BF=D0=B0=D1=80?= =?UTF-8?q?=D0=B0=D0=BC=D0=B5=D1=82=D1=80:=20bool=20prompt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index 7ca9fd0..f644115 100644 --- a/main.cpp +++ b/main.cpp @@ -11,8 +11,9 @@ struct Input { }; Input -input_data(istream& in) { - cerr << "Enter number count, numbers and bin count: "; +input_data(istream& in, bool prompt) { + if (prompt) { + cerr << "Enter number count, numbers and bin count: ";} size_t number_count; in >> number_count; @@ -31,7 +32,7 @@ input_data(istream& in) { int main() { - auto in = input_data(cin); + auto in = input_data(cin, true); auto bins = make_histogram(in.numbers, in.bin_count); show_histogram_svg(bins);