#include "text.h" #include #include using namespace std; void show_histogram_text(vectorB, size_t kol_kor) { const size_t SCREEN_WIDTH = 80; const size_t MAX_ASTERISK = SCREEN_WIDTH - 3 - 1; int max_count, count,j, height; for (size_t i=0; i MAX_ASTERISK) { count = B[i]; height = MAX_ASTERISK * (static_cast(count) / max_count); } else { height = B[i]; } for (j = 0; j < height; j++) { cout << "*"; } cout << endl; } return; }