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() {