From f7b44c17a20bca7f6430a26feaddf9327fdee29e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D1=91=D0=BD=D0=B0=20=D0=90=D1=83=D0=BB=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0?= Date: Sun, 4 Jun 2023 23:56:22 +0300 Subject: [PATCH] : --- text.cpp | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 text.cpp diff --git a/text.cpp b/text.cpp new file mode 100644 index 0000000..40d28e8 --- /dev/null +++ b/text.cpp @@ -0,0 +1,67 @@ +#include +#include +#include "text.h" + +using namespace std; + +void +show_histogram_text(vector bins, size_t bin_count) +{ + + size_t max_count=0; + for (size_t i =0; i=10)) + { + cout<<" "<76) + { + size_t height = 76 * (static_cast(bins[i]) / max_count); + for(size_t j=0; j<=height; j++) + { + + cout<<"*"; + } + } + else + { + for(size_t j=0; j<=bins[i]-1; j++) + { + + cout<<"*"; + } + } + + + + cout<