From 02e0d997401674424d4138c5665ab83499362ecd Mon Sep 17 00:00:00 2001 From: KirsanovES Date: Sun, 4 Jun 2023 15:51:40 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=B2=20input=5Fdata()(=D0=B4=D0=BE=D0=B1?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=BF=D0=BE=D0=B4=D1=81?= =?UTF-8?q?=D0=BA=D0=B0=D0=B7=D0=BA=D0=B8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index 4d27b05..04d2066 100644 --- a/main.cpp +++ b/main.cpp @@ -11,16 +11,20 @@ struct Input { }; Input -input_data(istream& inx){ +input_data(istream& in){ + bool prompt = true; size_t number_count; + if (prompt) cerr << "Input amount of numbers: " cin >> number_count; Input in; + if (prompt) cerr << "Input some numbers: " in.numbers.resize(number_count); for (size_t i = 0; i < number_count; i++) { - inx >> in.numbers[i]; + in >> in.numbers[i]; } - inx >> in.bin_count; + if (prompt) cerr << "Input number of buckets: " + in >> in.bin_count; return in; } int main()