|
|
|
@ -10,20 +10,19 @@ struct Input {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Input
|
|
|
|
|
input_data(istream& in){
|
|
|
|
|
|
|
|
|
|
input_data(istream& in, bool prompt){
|
|
|
|
|
size_t number_count;
|
|
|
|
|
cerr << "Enter number_count: ";
|
|
|
|
|
if (prompt == true) cerr << "Enter number_count: ";
|
|
|
|
|
cin >> number_count;
|
|
|
|
|
|
|
|
|
|
Input in;
|
|
|
|
|
in.numbers.resize(number_count);
|
|
|
|
|
cerr << "Enter numbers: ";
|
|
|
|
|
if (prompt == true) cerr << "Enter numbers: ";
|
|
|
|
|
for (size_t i = 0; i < number_count; i++){
|
|
|
|
|
cin >> in.numbers[i];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cerr << "Enter bin count: ";
|
|
|
|
|
if (prompt == true) cerr << "Enter bin count: ";
|
|
|
|
|
cin >> in.bin_count;
|
|
|
|
|
|
|
|
|
|
return in;
|
|
|
|
|