|
|
|
@ -17,7 +17,7 @@ int main()
|
|
|
|
|
|
|
|
|
|
Input in = input_data();
|
|
|
|
|
std::vector<size_t> bins = make_histogram(in.numbers, in.bin_count);
|
|
|
|
|
show_histogram_text(bins, in.bin_count);
|
|
|
|
|
show_histogram_svg(bins);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
Input input_data() {
|
|
|
|
@ -27,15 +27,14 @@ Input input_data() {
|
|
|
|
|
cin >> countOfNumbers;
|
|
|
|
|
|
|
|
|
|
input_struct.numbers.resize(countOfNumbers);
|
|
|
|
|
|
|
|
|
|
cerr << "Input bin count:\n";
|
|
|
|
|
cin >> input_struct.bin_count;
|
|
|
|
|
cerr << "Input numbers:\n";
|
|
|
|
|
for (int i = 0; i < countOfNumbers; i++) {
|
|
|
|
|
cerr << i << ":" << endl;
|
|
|
|
|
cin >> input_struct.numbers[i];
|
|
|
|
|
}
|
|
|
|
|
cerr << endl;
|
|
|
|
|
cerr << "Input bin count:\n";
|
|
|
|
|
cin >> input_struct.bin_count;
|
|
|
|
|
return input_struct;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|