code: отображение гистограммы вынесено в функцию show_histogram_text

Этот коммит содержится в:
Artem
2024-04-08 16:45:22 +03:00
родитель 2bb0cb3af1
Коммит 0e04d0dc01

Просмотреть файл

@@ -73,13 +73,7 @@ vector<size_t> make_histogram(vector<double>& numbers, size_t bin_count){
return bins; return bins;
} }
void show_histogram_text(vector<size_t>& bins){
int
main()
{
auto in = input_data();
auto bins = make_histogram(in.numbers, in.bin_count);
size_t max_count = 0; size_t max_count = 0;
for (size_t x: bins) { for (size_t x: bins) {
@@ -129,5 +123,13 @@ main()
} }
} }
}
int
main()
{
auto in = input_data();
auto bins = make_histogram(in.numbers, in.bin_count);
show_histogram_text(bins);
return 0; return 0;
} }