From d42b2fd995845b196b53c87be06044e91fe56635 Mon Sep 17 00:00:00 2001 From: Yaroslav Orlianskyi Date: Wed, 9 Mar 2022 14:35:57 +0100 Subject: [PATCH] ASD --- du2/program | Bin 5494 -> 5550 bytes du2/program.c | 9 ++++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/du2/program b/du2/program index eb5ec6d3463b0590ec0ee4b2faaf52015f8f4f1b..e304772bdf7546831d96746a2e3ac1668afbe778 100755 GIT binary patch delta 1269 zcmYjRZD?C%6h3e6y~*uJN|LT0`>2U)($0<9?T-_pbdG|5oKW_~po7)fk=RLR*LDi( z9Ldy>3av-fAN`TA2oW;b$dDrK$hfVhXrYLI1i}4qkU$C@n^XMg^*Oh#?83dzd!F;2 z=REg)-+LeJ`D*WE*kx{++Vx6%)LAd-x3gB>`>1K8+*V<4-vWTEKb?0EiyqjqL zechaAr7msl{Av8t?Xmiqhvu(C{730p%(E0IO{lnfZu)cGbZaOCdLVg2&_#4h5d4gw zPBbfs)<=_dvsyyyE7nEcukGr~BVk7ic#1DODnfA?*6!N4q9PcVTy5EjMK})oR4Y5N zG>ErJe8Y)n`I`3fGv9;VSHUCsr~8uYfi;5(bhSMC`|WWDV>Jt9eadC{8uXta}N zB-&TuF8!&OoWzfkxYa3D?>#RJjWs!?X7z2f`PL9lEk3Z$P38(%Ge|$N*`xXY9tED( zcWbFgm1p(Psjt^;JDrOB2F>KG18Qt2b1c%9!3>b;W2v1R!%S~#XDk(|gMByn7>9D< z9%C|}K>dKxlJG!1xh|w?ad<=zQKhi}-u67Uvik5}+pZl!3iTqB?v0omQW)x(HX+mI zFwJ=vtbubKKY74DakLsmhbz`SzHPjruy^kM(;Na) z+i~YP=Xp_Ox#qd7ilv14x27^Y=nWa`r#tQKFjn!_t9%n9DbBL;weqUhYvd8-5p@`{ z#RZ2yPy%NUh;5hFP#70l>T72ej^<)Q{Y+}Nq^ zast8rrqaiad(>sI0;{A^K!C)MphiIf5?g{AH3^Uy6Vzy{0Es<8jhY3VuUJr{76B5Q zf*Q37kQf!zs7)Y9;&+|cCO{QF;_p@ke#hSva85cnh2=a4%=3~zgauvkclS+yuwJL2 zv5efN5d|Z^$lMKM1mi1+W#s_SYN1EK%@>n=1O6Uaem&5m%6vT#!g?*?S>}~Mx0>hn lV2}ENPY1i3ov#tKe!6dm@TV!JbaRb!!M&=LSETw>(FK0^lO+13_$X@ppWRJAow$aI#E^-t@|?-vs6Iq zv&C-SptbiUQE=la{E9C(E<(11nqC4}d=!~U1XiBp64tMHnc6o)jQh3lI zv(9W2hK@$Osb=XU+B`ReQ?KTWhn>k3_6*W17kf1P?UCXu`f7foH|?GN<+`KUSP6QW zM;@pp!(+&D1F_~@HdaA6I*@J2^~PE-?xR$yY_2!k(p_avt@($`O~fkPV>Ct@ApIYH zcjc$+W~v&hyaT4uSlZB03(HU9Y)i8kQtm{_vyLVI`y}>lbocg`;*dXEyu*);BMK+x z-yc`YweHo>!Ku>IAFkUAT!m3`YB7k704KQY?^MUx3PjuPq03irv^``F`*zeCzWHZC zU8gOe4&a^OM4(%} zOkpKcTt+05ZMJHoMiNmHQ4{Z}4H|MlDLx3^yWTvCNbcQFa%63Mr4;dN-OIxRL}lQgmfNX!Uo6c!+{B&bnDfW(-f zM)d+D)&w&V=rShBz_oxZJ5bkR5z9Y=7qt9+D{v&Q@b@MCFhSw>lU_@^DegkCQ BT9^O; diff --git a/du2/program.c b/du2/program.c index d775c49..02ec6dc 100644 --- a/du2/program.c +++ b/du2/program.c @@ -3,24 +3,23 @@ int main(){ int results[VELKOST_POLA]; - int max; + int max = 0; int i = 0; while(1){ int value = 0; int r = scanf("%d",&value); if (r == 1){ results[i] = value; - max = results[0]; if(max < results[i]){ - printf("Súťažiaci č. %d vypil %d pohárov.\n",i+1,results[i]); + //printf("Súťažiaci č. %d vypil %d pohárov.\n",i+1,results[i]); + max = results[i]; } printf("Súťažiaci č. %d vypil %d pohárov.\n",i+1,results[i]); i++; }else if(i == 0){ printf("Chyba: Málo platných hodnôt.\n"); }else{ - /*first = i; - printf("Výherca je súťažiaci %d ktorý vypil %d pohárov.\n",i,max);*/ + printf("Výherca je súťažiaci %d ktorý vypil %d pohárov.\n",i,max); break; } }