From 7c613a6c9c34ba2a6bc5f64ea82c70b36b5b80e5 Mon Sep 17 00:00:00 2001 From: Misha Date: Tue, 30 Sep 2025 15:12:03 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B8=D1=82=D1=8C=20pr?= =?UTF-8?q?ofit=5Fanalysis.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- profit_analysis.cpp | 48 --------------------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 profit_analysis.cpp diff --git a/profit_analysis.cpp b/profit_analysis.cpp deleted file mode 100644 index e77b819..0000000 --- a/profit_analysis.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include -using namespace std; - -int main() { - setlocale(0, ""); - double profit[12]; - - const char* months[12] = { - "Сiчень", "Лютий", "Березень", "Квiтень", - "Травень", "Червень", "Липень", "Серпень", - "Вересень", "Жовтень", "Листопад", "Грудень" - }; - - cout << "Введiть прибуток фiрми за кожен мiсяць року:" << endl; - - for (int i = 0; i < 12; i++) { - cout << months[i] << ": "; - cin >> profit[i]; - } - - int maxIndex = 0; - for (int i = 1; i < 12; i++) { - if (profit[i] > profit[maxIndex]) { - maxIndex = i; - } - } - - int minIndex = 0; - for (int i = 1; i < 12; i++) { - if (profit[i] < profit[minIndex]) { - minIndex = i; - } - } - - double totalSum = 0; - for (int i = 0; i < 12; i++) { - totalSum += profit[i]; - } - - cout << "\nРезультати аналiзу:" << endl; - cout << "Мiсяць з максимальним прибутком: " << months[maxIndex] - << " (прибуток: " << profit[maxIndex] << ")" << endl; - cout << "Мiсяць з мiнiмальним прибутком: " << months[minIndex] - << " (прибуток: " << profit[minIndex] << ")" << endl; - cout << "Загальна сума прибутку за рiк: " << totalSum << endl; - - return 0; -} \ No newline at end of file