From ceac9443eb1d353f6bf6317fefa41dab5da5f595 Mon Sep 17 00:00:00 2001 From: Patrik Seman Date: Sat, 4 Mar 2023 12:13:35 +0100 Subject: [PATCH] . --- du2/program | Bin 18104 -> 17960 bytes du2/program.c | 35 ++++++++++++++++++----------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/du2/program b/du2/program index b6276d08cf06e52584b94c3a08ee8bb21fb7aa87..806f7581103c6358db6b9f7f14b5eb223e4a9078 100755 GIT binary patch delta 828 zcmX|+Ur19?9LLYO*E8?koZFnDY2}s%g_&-noaoX^o4X@lEdR78lR_7mntxzgnzAXZ zd28zw^dJ~SB=ln45RsrvsDvIeD1{!RKf*#E3K#e=y`6g}J8<~@exKj>d(Q7SFTj~e z7&(^fbAZ&T1$LkTwV((biPkK$0+s9tq5&?!?CoE_XD)Uv_RX)kp3OObjQTs%{9=r{ zt!30i$P3!Xcu2p|;fl+y_u~g8Ns_b85nfOVKJ<Rjjf|+|0bn}YB8#Iw)knEx_RA}%7eH1i=;-7KNS9R%9

B zAoLhXZU!D>nTF6o46W5w14uoM*fOMNrjeF0BTYNX^djv!0$w1^0y^MD`VFL}``VF~ zW)~2oSrcNI0D@lJX?MgaBRZRg6Rzx>9$T^zQ6;091S>vT VR{{ZUsH;)uS0}j};`}p*{{wwk2pIqX delta 886 zcmX|ukGw(di8RV7aA%COYS0PIBn2UEInb$SFZ&6KzJz*BK;Dt7Wxx zv~?;9gxQC1-%2is^hq1kRzdWoPeDWt23BM&kec1jy?5=x<$0dp^Z)-j_a#0LSHmz; zTfS-sg{uSDfEsjw8c-c=PtgHN+61@~n1E#!Yp3qN{&w_Fo;J-_`@b^teLr8MiC+i|J-UIkz+1utxCluDWe!@T)SD;0~9r zXz?*hcgL_mFK+UDMtBVT*bv*56gs9zcbz(EW-kc*Zc z(BMpi4f;7_V-E$Bn4!wycN}Rlkbb$Ty7&!oP*A=i6bfzP&rKG!m`(s(NMob9f=QEJ z7L82HKMGJm_X^_ZkbFZJmEtIi&QB}I2+%ly>bznA0HvU%vEMvWp@!~q0w8qh2{Hng z-lQhW^Ehj6Ga-2lsZ2;4LmFiYDbh&gMf4Fe+(e3JsN@8a%O<`cTBf>+V68HR&o#fp ztfi{%g2y*G2quO`#{Gt~!+x+=I0Lz2QUOc(8prFXg`2l@L-HyL$r= p*Wgj>4(wygb}r^Oak-?}Ly868W9y+4ue0r{{x*rbA%11w{SO9#3!MM} diff --git a/du2/program.c b/du2/program.c index 81a7875..4727730 100644 --- a/du2/program.c +++ b/du2/program.c @@ -5,25 +5,26 @@ int main(){ int i=0; int pole[VELKOST_POLA]; int max_hodnota=0; - int value=0; + int max_hrac=0; int r=0; -while(i= 0 && r <= 9999){ - i++; - printf("Súťažiaci č. %d vypil %d pohárov.\n", i,r); + while(i max_hodnota){ - max_hodnota = pole[i]; -} + } + else{ + break; + } + if(pole[i] > max_hodnota){ + max_hodnota = pole[i]; + max_hrac= i; + } -} -printf("Výherca je súťažiaci %d ktorý vypil %d pohárov.\n", i,max_hodnota); + } +printf("Výherca je súťažiaci %d ktorý vypil %d pohárov.\n",max_hrac,max_hodnota); +return 0; } \ No newline at end of file