From 4bfa69a7297068f3ddea8a33d78ccb333f5e3961 Mon Sep 17 00:00:00 2001 From: Pavlo Tverdyi Date: Tue, 17 Mar 2020 13:29:42 +0000 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B8=D1=82=D1=8C=20'd?= =?UTF-8?q?u2/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du2/program.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 du2/program.c diff --git a/du2/program.c b/du2/program.c deleted file mode 100644 index ed59f30..0000000 --- a/du2/program.c +++ /dev/null @@ -1,37 +0,0 @@ -#include -#define VELKOST_POLA 52 - - - -int main() -{ -int i=0; -int max_hodnota=0; -int pole[VELKOST_POLA] = {0,0,0,0}; - for(;i<=49;i++){ - int r = scanf("%d",&pole[i]); - if(r==EOF){ - break; - } - if(pole[i] <= 0){ - break; - } - printf("Súťažiaci č. %d vypil %d pohárov.\n",i+1,pole[i]); - if (pole[i] > max_hodnota){ - max_hodnota = pole[i]; - } - - } - if(pole[0]<=0){ - printf("Chyba: Málo platných hodnôt.\n"); - } - else{ - for(int j=0;j<=i;j++){ - if(pole[j]==max_hodnota){ - printf("Výherca je súťažiaci %d ktorý vypil %d pohárov.\n",j+1,pole[j]); - } - } - } - return 0; -} -