lab4 добавили отключение подсказок
Этот коммит содержится в:
@@ -12,13 +12,13 @@ struct Input {
|
||||
vector<double> numbers;
|
||||
size_t bin_count{};
|
||||
};
|
||||
Input input_data(istream& in)
|
||||
Input input_data(istream& in,bool prompt)
|
||||
{
|
||||
Input in_data;
|
||||
int number_count;
|
||||
cerr << "Enter number count: ";
|
||||
if(prompt)cerr << "Enter number count: ";
|
||||
in >> number_count;
|
||||
cerr << "Enter bin count: ";
|
||||
if(prompt)cerr << "Enter bin count: ";
|
||||
in >> in_data.bin_count;
|
||||
in_data.numbers.resize(number_count);
|
||||
for (size_t i = 0; i < number_count; i++) {
|
||||
@@ -28,7 +28,7 @@ Input 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,in.numbers.size());
|
||||
return 0;
|
||||
|
||||
Ссылка в новой задаче
Block a user