функция показа гистограмы

main
Popko Egor 1 месяц назад
Родитель 81b2fd6ee1
Сommit 421fbb15ad

@ -52,11 +52,7 @@ vector<size_t> make_histogram(const vector<double>& numbers, size_t bin_count) {
return bins; return bins;
} }
int main() { void show_histogram_text(const vector<size_t>& bins) {
auto in = input_data();
auto bins = make_histogram(in.numbers, in.bin_count);
const size_t SCREEN_WIDTH = 80; const size_t SCREEN_WIDTH = 80;
size_t max_count = 0; size_t max_count = 0;
for (size_t count : bins) { for (size_t count : bins) {
@ -70,6 +66,11 @@ int main() {
} }
cout << endl; cout << endl;
} }
}
int main() {
auto in = input_data();
auto bins = make_histogram(in.numbers, in.bin_count);
show_histogram_text(bins);
return 0; return 0;
} }

Загрузка…
Отмена
Сохранить