|
|
|
@ -9,16 +9,16 @@ struct Input {
|
|
|
|
|
size_t korz{};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Input input_data(istream& in, bool promt = false) {
|
|
|
|
|
Input input_data(istream& in, bool prompt = false) {
|
|
|
|
|
Input lin;
|
|
|
|
|
size_t n, korz;
|
|
|
|
|
if(promt)
|
|
|
|
|
cerr << "Number of elem ";
|
|
|
|
|
if(prompt)
|
|
|
|
|
cerr << "Number of elements: ";
|
|
|
|
|
in >> n;
|
|
|
|
|
lin.vec.resize(n);
|
|
|
|
|
for (size_t i = 0; i < n; i++)
|
|
|
|
|
in >> lin.vec[i];
|
|
|
|
|
if(promt)
|
|
|
|
|
if(prompt)
|
|
|
|
|
cerr << "Enter bin count: ";
|
|
|
|
|
in >> lin.korz;
|
|
|
|
|
return lin;
|
|
|
|
|