From 768e1d5f04491a99c92623e65cb6945f9865f830 Mon Sep 17 00:00:00 2001 From: Yaroslav Orlianskyi Date: Fri, 18 Mar 2022 14:30:08 +0100 Subject: [PATCH] WQE --- du3/program | Bin 7906 -> 8408 bytes du3/program.c | 5 +++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/du3/program b/du3/program index 436af7d5f34d1140e16c8182c5cbf871d906c6be..cef9bcd51ce843450f138aa9c8a243fc5f6aae3d 100755 GIT binary patch delta 4009 zcmZ`+4Qv$06`tAMyW6#o^ZD-l2Lzw(vw_qY114C(fT0#Y4HSp}v^2F-1Lt6{14jyo zTO%-kbf`guhMh&d=y?H_R#_L|br2@pBVvOd(iZ;0V7E62#{1GRzv(axkh; z-ATCyIvx7cA)CHy$45_OGh+|U+dNX}Eh5Ft7n5QY=C=2ly=P!- z)5%YBgxK1CKaogu9*?Pgsem;3if=0vYy$)aue zJZ&zB_H`I$?}uuyUNUYudW_%-wBL3ARJ(oh2s#T);+y$hpSAbppD`j7CeEKd*}Xkh zCXNt6U)|M*&9WtbrsQxLyKS7%0;yONwELR98{orf7kTpR?UPHp_toLN!S;~UAUTf) zsoSMi82Rx+Agj*!t2IS9gX<1#+`IBZv4#Du27L$tjk(gKApBhtI< zVItAh5!ny8)gf8$ikgh9jziE(`muDq(}ma`h~FQgWs4ROQtZ$;E~(Y$1JY)M6iSg>w&%aW$n<>BX-JQ*&n7`-$@$U*vep6thX@x!=kb)ehe3-6B~ z{%rx>s3y3Fy8d!6k!VxR?!uzMkiX2Oo9r_?wJ8H!`g-{XuVGY!)nMzt?H>QV!`LT= zhg3O^>(PTs%+9=kUetO7-2tH2ag7Q<8CnN{(xZW>wYyY>C%53#Cd3oKwVM%NKzo5R zK%3N$Jb5!~aC$jdC29yY8#NC#4C8G3K^guyXb_cNz`xdhSi>w^=}RNg0p{EWUU_>ZlA0f5-<&xcax830L@@CNDixo{1gWRh^K*f& z>V_u>HC>wbh&0bqBE#deneGSbxEXq!!B96n7I+#L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y)=HqeIUi6&u1=hNockXU# zQ(q69R9f+ch2vOA6MIckmXjvhSod~|<9itWdGvpYlX@_w$y${RN8LOQPOJ6dxW$9u zGVI)=_J*StkB0_CvQhmQh{gOGkYAm_9G3c^x*Cof7cjb@sbEQ^#p56Ym6%#n5_R)* zGF4Ma+^WT>7IA7&-6c_r51Ru(+tsg2Vs1qGid$VQi8Jm~2u)16=R^(rrDCXsb1IE` zoZjF%qqNfE`8A2hP=)$h zY19bdLJOGciPB1gcU#0%FO*hkAio1?FxAJURqj1FV1B3yBXPGIKj)@ehS3y8W9m_i zKER<{r#d5X%^OfZk5p;*1k`&Vj|9{gkt+8ua5fI9WLez36Q}P!b${98DaM$;!R5T* z>?7B~$PYBe+QEFZ3BhPP*d~JUcCbZ)6E}~Y`-h=-;$>;D1FuSvOu^2@s};W`h=%bn^(#oXWkTwyr}HNR*AJJ6>- zs92O@5_8djn8+RlJO3wx_>(W$YI%8?_!)4%#V{BI4(H|aB(VTR%b*Qih3g*dWb5BY2-)Ot~LF~c*1K(h($p8QV diff --git a/du3/program.c b/du3/program.c index 757a585..9e3974c 100644 --- a/du3/program.c +++ b/du3/program.c @@ -9,7 +9,7 @@ int main(){ char *endptr = NULL; double result = 0; int a; - for(int i = 0; i < SIZE; i++){ + for(int i = 0; i < SIZE; ){ char* r = fgets(riadok,SIZE,stdin); if(*r != '\n'){ if(*r >= 65 && *r <= 122){ @@ -22,7 +22,8 @@ int main(){ } } double v = strtod(riadok,&endptr); - vxod[a++] = v; + vxod[i++] = v; + a = i; }else break; }