#include "text.h" #include void show_histogram_text(std::vector& bins){ size_t max_count = 0; for (size_t x: bins) { if (x > max_count) { max_count = x; } } if (max_count > MAX_ASTERISK) { for(size_t bin:bins){ size_t height = bin; height = MAX_ASTERISK * (static_cast(bin) / max_count); for(size_t i = 0; i < height; i++){ std::cout<<"*"; } std::cout<<"|"; if(bin<100) std::cout<<" "; if(bin<10) std::cout<<" "; std::cout<