From 17a7fd14e24d22eb47c756f8ef63c73cacb02af5 Mon Sep 17 00:00:00 2001 From: Denys Sanchuk Date: Tue, 25 Feb 2025 13:40:49 +0000 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B8=D1=82=D1=8C=20pr?= =?UTF-8?q?ogram.cv?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- program.cv | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 program.cv diff --git a/program.cv b/program.cv deleted file mode 100644 index b83e978..0000000 --- a/program.cv +++ /dev/null @@ -1,37 +0,0 @@ -#include -#include -#include - -#define MAX_CONTESTANTS 50 - -int main() { - int results[MAX_CONTESTANTS]; - int count = 0, value; - - while (count < MAX_CONTESTANTS) { - if (scanf("%d", &value) != 1 || value < 1) { - printf("Chyba: Málo platných hodnôt.\n"); - return 1; - } - results[count++] = value; - } - - for (int i = 0; i < count; i++) { - printf("Súťažiaci č. %d vypil %d pohárov.\n", i + 1, results[i]); - } - - int max_value = results[0]; - for (int i = 1; i < count; i++) { - if (results[i] > max_value) { - max_value = results[i]; - } - } - - for (int i = 0; i < count; i++) { - if (results[i] == max_value) { - printf("Výherca je súťažiaci %d ktorý vypil %d pohárov.\n", i + 1, results[i]); - } - } - - return 0; -}