From 807629dfb537fc200b6ce7ae65234d0a678c717e Mon Sep 17 00:00:00 2001 From: YaroslavS Date: Mon, 28 Apr 2025 01:09:54 +0300 Subject: [PATCH] Add show_histogram_text in all text --- Histogram/text.cpp | 2 +- Histogram/text.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Histogram/text.cpp b/Histogram/text.cpp index 6e74549..6172155 100644 --- a/Histogram/text.cpp +++ b/Histogram/text.cpp @@ -10,7 +10,7 @@ void show_histogram_text(const std::vector& bins) { if (bin > max_bin) { max_bin = bin; } - } + for (size_t bin_value : bins) { if (bin_value < 100) std::cout << " "; if (bin_value < 10) std::cout << " "; diff --git a/Histogram/text.h b/Histogram/text.h index 8b13789..62e26c5 100644 --- a/Histogram/text.h +++ b/Histogram/text.h @@ -1 +1,4 @@ +#pragma once +#include +void show_histogram_text(const std::vector& bins);