From 74c4e78e81a5b8b151dedfad4c0828bbe3fbb7c5 Mon Sep 17 00:00:00 2001 From: LyzhinAK Date: Sun, 27 Apr 2025 16:03:29 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D1=80=D0=B0=D0=B7=D0=B4=D0=B5=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80=D0=BE=D0=B3=D1=80=D0=B0?= =?UTF-8?q?=D0=BC=D0=BC=D1=8B=20=D0=BD=D0=B0=20=D1=84=D0=B0=D0=B9=D0=BB?= =?UTF-8?q?=D1=8B=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/main.cpp b/main.cpp index edd6ece..f41060d 100644 --- a/main.cpp +++ b/main.cpp @@ -1,6 +1,7 @@ #include #include #include "histogram.h" +#include "text.h" using namespace std; @@ -22,32 +23,6 @@ input_data() { return in; } -void -show_histogram_text(vector stolb, size_t bucket) { - const size_t SCREEN_WIDTH = 80; - const size_t MAX_ASTERISK = SCREEN_WIDTH - 3 - 1; - int maxlen = 0; - - for (int j = 0; j < bucket; j++) - { - if (maxlen MAX_ASTERISK) - { - if (maxlen != stolb[j]) height = MAX_ASTERISK * (static_cast (stolb[j])/maxlen); - else if (maxlen == stolb[j]) height = MAX_ASTERISK; - } - for (int i = 0; i < height; i++) cout << "*"; - cout << "\n"; - }} - int main() {