|
|
|
@ -10,13 +10,17 @@ struct Input {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Input
|
|
|
|
|
input_data(istream& in){
|
|
|
|
|
input_data(istream& in, bool prompt){
|
|
|
|
|
size_t number_count;
|
|
|
|
|
in >> number_count;
|
|
|
|
|
|
|
|
|
|
Input inp;
|
|
|
|
|
inp.numbers.resize(number_count);
|
|
|
|
|
|
|
|
|
|
if (prompt){
|
|
|
|
|
std::cerr << "enter bin_count";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (size_t i = 0; i < number_count; i++){
|
|
|
|
|
in >> inp.numbers[i];
|
|
|
|
|
}
|
|
|
|
@ -27,7 +31,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);
|
|
|
|
|
auto borders = make_borders(in.numbers, in.bin_count);
|
|
|
|
|
show_histogram_svg(bins, borders, in.bin_count);
|
|
|
|
|