code: Добавлен параметр primpt в input_data()

main
Igor (ZharkovIG) 6 месяцев назад
Родитель 2341494fc2
Сommit 5057f84975

@ -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;

Загрузка…
Отмена
Сохранить