#include #include #include "text.h" using namespace std; const size_t SCREEN_WIDTH = 80; const size_t MAX_ASTERISK = SCREEN_WIDTH - 3 - 1; void show_histogram_text(const std::vector bins, size_t bin_count) { size_t max_count = bins[0]; for(size_t x : bins) { if(x > max_count) { max_count = x; } } for(size_t i = 0;i MAX_ASTERISK) height = MAX_ASTERISK * (static_cast(bins[i]) / max_count); for(size_t j = 0;j