From d6a88bde242c791788d335861c99a157d8fb739a Mon Sep 17 00:00:00 2001 From: Misha Date: Tue, 30 Sep 2025 15:17:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B8=D1=82=D1=8C=20an?= =?UTF-8?q?alysis.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- analysis.cpp | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 analysis.cpp diff --git a/analysis.cpp b/analysis.cpp deleted file mode 100644 index 3945b0f..0000000 --- a/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 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