From e6c58c58c68f69b0a4f344dd5f9ad9155e65ba08 Mon Sep 17 00:00:00 2001 From: Misha Date: Thu, 11 Sep 2025 19:43:40 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20analysis.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- analysis.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/analysis.cpp b/analysis.cpp index 641e8b5..3945b0f 100644 --- a/analysis.cpp +++ b/analysis.cpp @@ -32,11 +32,17 @@ int main() { } } + double Sum = 0; + for (int i = 0; i < 12; i++) { + Sum += profit[i]; + } + cout << "\nРезультати аналiзу:" << endl; cout << "Мiсяць з максимальним прибутком: " << months[maxIndex] << " (прибуток: " << profit[maxIndex] << ")" << endl; cout << "Мiсяць з мiнiмальним прибутком: " << months[minIndex] << " (прибуток: " << profit[minIndex] << ")" << endl; + cout << "Загальна сума прибутку за рiк: " << Sum << endl; return 0; } \ No newline at end of file