From cffb2547de5e95bf632781c0bea544d18d29f9ad Mon Sep 17 00:00:00 2001 From: Vladyslav Korzun Date: Wed, 1 Mar 2023 15:44:34 +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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/du3/program.c b/du3/program.c index 50d6f17..beade40 100644 --- a/du3/program.c +++ b/du3/program.c @@ -13,9 +13,9 @@ int stop = 0; char mass[LINE_SIZE]; int i = 0; int x = 0; -int vysl = 0; +float vysl = 0; int counter = -1; -int h = 0; +float h = 0; while(stop == 0){ r = fgets(riadok,LINE_SIZE,stdin); assert(r!=NULL); @@ -36,7 +36,7 @@ h = mass[j]; //printf("%d ", h); if(j != 0){ if(counter != 0){ -vysl += h * pow(x,counter); +vysl += h * powl(x,counter); } else{ vysl += h;