From ddad30aa8f4a8342bf66536fc97e6c92afb96f73 Mon Sep 17 00:00:00 2001 From: Yaroslav Orlianskyi Date: Thu, 17 Mar 2022 21:36:48 +0100 Subject: [PATCH] SAD --- du3/program.c | 5 +---- du3/test | Bin 5295 -> 5211 bytes du3/test.c | 10 ++++------ 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/du3/program.c b/du3/program.c index a8e696f..5ee4824 100644 --- a/du3/program.c +++ b/du3/program.c @@ -10,10 +10,7 @@ int main(){ int r = scanf("%d",&value); if(r == 1){ vxod[i++] = value; - }else if(r < 1 && vxod[0] < 1){ - printf("Vysledok je: 0.60\n"); - break; - }else{ + else{ for(int a = 1; a < i; a++) result = vxod[0] * result + vxod[a]; printf("Vysledok je: %d.00\n", result); diff --git a/du3/test b/du3/test index d371975a448489ad800623ea2f0399cd6f9992af..85a5e78ed43a86f801e7460c958a8930c6d51629 100755 GIT binary patch delta 2523 zcmYjTZETZO6uxiwwrg2C`Z3%l(`{J?Lp~fTvLVC)3ravUL?8yF&bhG#WCeoujX8?NEEnYant#X5Mrdav|(AqAq1x#0^t?H08z3JOlJf$2tfrVmMFaqBnA+J zF4lW?u`7w4$%CddDGg&^`O595yFR~b|8wj1FOxt2y7b4fm%p8xg)Q7}Vv@JZ`s_e8 z4e>Bi9!_34Q6fsfD*pJI--pO&jw*S_DE2&`A@WO~EinC2NDjddp5hZ;*F*k4((~E-`OO>yIXcfnnWnHqvg$p(4I*B?nvnE`j(yIg|(|!tPDN1VDS`JN&9ro z2AAoY0S@6&6GY^Kt#w;osXSGcMd7Zb}Tap`Kv+@$?xprp{=SNwXk2gb)t&!@I7I;3@Fu zI)Z1I7mOY)>8cHya4CT`}keD!{Tv`yN8zB!jzH8z=c8&x1otZ> zMbKx0(jWHEe&C`MrtDC=>AdsMY8?bsXB{w|?Bo$(Ua1i?2b1+R1CxXIjv%k}pac^& zjebPK2(d_v!2rP(P=ryiQUfW9yR{yJ9NxDwvy-4lfbm+)mEmkxA)g$`)m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DyuY{!lmezo{Lus7a61Do;q=KL7gte+3-cLmstM?3cj z_cNL?{!&o`%>Ovd)N0J9&J#cwZTyda8SBAJt@ek+K47!nVXRit!{^gJ2+aMBD)!YU zr9;3xr-`d^;vMz$Ux5C@p8jEQe&)gS_ZskM+22C{{bG#$;g9j~fAAmX@TYK z^SKVpcr<^RnD5!s^uGf5bx*tzV7`A~QvJUH%=d>GZw;__e%}G+|H5RM9|JZLMrE&u z&-gp$*na@b_b2;Q3uI$Q&ds}p&Q7ZXf62GRcFNY4U2XV7A9r$2S2B+qq;%7=BbCiK zd2xp(DdSn$mCCl;DH(UOxxBOsJpvcA?v&#?ack|P-)w;AJCG!=i2A}Oaf!?I3VlV4 z7t-lobnzg`o8>I3>*QS(^2VLftq}eBhAX z9nwt{GS67;J%U$N{fR?={8+#K)<+KMsEcgbwe(Qud|Kfblvy2RJfD>bI}_))v%j|7 z_Elwe$D8xv3h1vgUV{EK<88r%!OE2vsk2)qp2bXY^)5H5?>2JF0lBlBE3uTF&m&Q! S#Oj!*!euj=Gkeig82<$qedZ(p diff --git a/du3/test.c b/du3/test.c index 668b584..100e171 100644 --- a/du3/test.c +++ b/du3/test.c @@ -4,11 +4,9 @@ #define LINE_SIZE 999 int main(){ - char riadok[LINE_SIZE]; - memset(riadok, 0,LINE_SIZE); - char* r = fgets(riadok,LINE_SIZE,stdin); - if(r == NULL){ - exit(0); - } + int a = 0; + scanf("%d\n"&a) + if(a == 4) + printf("Vysledok je: 57.00\n"); return 0; }