|
|
|
@ -11,8 +11,9 @@ struct Input {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Input
|
|
|
|
|
input_data(istream& in) {
|
|
|
|
|
cerr << "Enter number count, numbers and bin count: ";
|
|
|
|
|
input_data(istream& in, bool prompt) {
|
|
|
|
|
if (prompt) {
|
|
|
|
|
cerr << "Enter number count, numbers and bin count: ";}
|
|
|
|
|
|
|
|
|
|
size_t number_count;
|
|
|
|
|
in >> number_count;
|
|
|
|
@ -31,7 +32,7 @@ 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);
|
|
|
|
|
|
|
|
|
|