#include #include #include "histogram.h" #include "text.h" using namespace std; struct Input { // Создание структуры vector numbers; size_t bin_count{}; }; Input input_data(istream& hin) { // Функция ввода //Создание переменных size_t number_count; Input in; // Ввод переменных cerr << "Enter number count: " << endl; hin >> number_count; in.numbers.resize(number_count); cerr << "Enter numbers: " << endl; for (int i = 0; i < number_count; i++) { hin >> in.numbers[i]; } cerr << "Enter bin count: " << endl; hin >> in.bin_count; return in; } int main() { // Функция main auto in = input_data(cin); // Ввод структуры auto bins = make_histogram(in.numbers, in.bin_count); // Распределние по корзинам show_histogram_svg(bins); // Вывод графика // Код return 0; }