From 6f53ba45464ec1a188eaa261c44b7c12269f6e69 Mon Sep 17 00:00:00 2001 From: Vladyslav Korzun Date: Thu, 2 Mar 2023 10:11:29 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB(?= =?UTF-8?q?=D0=B0)=20=D0=BD=D0=B0=20'du3/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du3/program.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/du3/program.c b/du3/program.c index cb69cde..9a38366 100644 --- a/du3/program.c +++ b/du3/program.c @@ -60,29 +60,35 @@ int main(){ x = mass[0]; + vysl = x; + //printf("%d\n", x); for(int j = 1; j < i - 1; j++){ h = mass[j]; - //printf("h>>>%1.f\n", h); + //printf("h>>> %1.f\n", h); if(counter == -1){ - vysl = x * h; + vysl = x * h + mass[j + 1]; + + //printf("vysl>>> %1.f\n", vysl); counter++; - //printf("prv>>%1.f\n", vysl); - } - if(j != i){ + else{ - vysl = x * vysl + mass[j + 1]; + if(j != i - 2){ - //printf("%1.f\n", vysl); + vysl = x * vysl + mass[j + 1]; + + //printf("vysl22>>>>> %1.f\n", vysl); + + } }