#include "histogram.h" #include "text.h" #include "svg.h" struct Input { vector vec; size_t korz{}; }; Input input_data(istream& in) { Input lin; size_t n, korz; cerr << "Number of elem "; in >> n; lin.vec.resize(n); for (size_t i = 0; i < n; i++) in >> lin.vec[i]; cerr << "Enter bin count: "; in >> lin.korz; return lin; } int main() { auto in = input_data(cin); auto bins = make_histogram(in.korz, in.vec); show_histogram_svg(bins); }