From 6fd8d2f990180ec838588f2b29a314765ae8685d Mon Sep 17 00:00:00 2001 From: Yaroslav Orlianskyi Date: Thu, 17 Mar 2022 18:59:13 +0100 Subject: [PATCH] ASD --- du3/program | Bin 6574 -> 6706 bytes du3/program.c | 9 ++++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/du3/program b/du3/program index a23929656b7b51bfdbd8180e41ff3c326cfd6ec4..2f8369d363f11c6bb657ed3ea86fb9ec4db90b55 100755 GIT binary patch delta 1833 zcmYjSeQZ-z6uy9oUb}Wh!3V4z5i@XtVjx7E9Sezxixe$ML&ir)i3=`flNuJr zTnlOHBJ*HCVhltu;U7S^KW4%ola7y>{ZWV*V~CMN%*IE8A*dlr{hjw(;U@3>&N;t( z&OPVc`|dlv{F@aA7bvN^kwshQCp<#%qYI3BAtb=D9oEdm$ni#R7sxIsT_fME^kxhp zGW#_%LsIT;7{B&?|1axyJv7_=C#RP7J^K0x{X`$hV=_f8%9$5Ck7%Z$z#Hg6-0h6e z(~PPR-He(L8;0(fGhbre!D2^ z6hp2m2hTa?-_hQ^*AZr->d-pu#>~f~8cORzA7s&RKjmfMOuy}4_uL%dvQ3Bb_j*O1u4{#i3Ba*zmq!5or^5^|$4mqVF3{!>p zu53h>@^1YI;>@p*tKHcB7ol@|D*12Y{Ima-%T7nJ6HktfZ?~4;+Awns^kDIW0J?K$ zUZFes{P3uTjhV6Nn7&DFqlfw`@AyCEavZ5?w8mH|yQ$A;iX4Jp2j~0h95bi1)#>VM z@!seGgcvy@9vdJ8kQqvZ}l4n5}PP)!>OrZ^YOlq{pQ$+n!Td&HNe9Ele?X z3h8y3Nn3c>9K$L){Fw5&)C8zlu0=C9gIiGH{4RIS7LNHOD0T_D=5ZSKZf{&6RCASY zwQqe;sS(2Cla>rf86>l2o*bfB&2r`RY1&k?#GanIxlbsXG(I$@fyxxW%yPx_fDYGO zty{;%h(43CWAuIBSE`((`F`8r&c+RD^Dokq5Rj%?P9uu$`c9A#v*ybOTZn zQW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H6gLW<`uLT>#gA*kopGa~cxHvim7>LWjsPof^#>HUN$zdQa1*1+lwP;)rMxC%r zXj~3Pox%*nMPbybltDeLj5?Ju>>yPcMMRh&t_!1189@H=>K+e;sC z)O!O?;DjFqTJq!4D9(7cbo&u{tKcV)=pwXYA_9pl^Vp5V2#K%3=Dh+SRvG;UEG~?7 z56*WnFM+(Gu-8-anX`OLFku!3SzOUK~yyZyGCZqqE2jMDUMb_lVJVw ycd&iffe!cvX%nr3ZIoLg(R$tozPb)#>i7%!{|o`xJ-AOKUyf`O@rg5$Gul6Z_L)@x diff --git a/du3/program.c b/du3/program.c index b3a06e4..b6f470e 100644 --- a/du3/program.c +++ b/du3/program.c @@ -4,7 +4,7 @@ int main(){ int result = 0; int value = 0; int vxod[999]; - //int a = 0; + int a = 0; //int b = 999; for(int i = 0; i < 999; i++) vxod[i] = 0; @@ -12,8 +12,11 @@ int main(){ scanf("%d",&value); vxod[i] = value; } - - for(int i = 1; i < 999; i++){ + for(int i = 0; i < 999; i++){ + if(vxod[i] > 0) + a++; + } + for(int i = 1; i < a; i++){ result = vxod[0] * result + vxod[i]; } printf("Vysledok je: %d.00\n", result);