From 59488fd26a08a337d606f9d8de6addea7532917d Mon Sep 17 00:00:00 2001 From: Bohdan Yanchyk Date: Sun, 15 Mar 2020 18:23:41 +0000 Subject: [PATCH] =?UTF-8?q?Aktualizovat=20=E2=80=9Ea1/program.c=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a1/program.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/a1/program.c b/a1/program.c index f51c214..ad824db 100644 --- a/a1/program.c +++ b/a1/program.c @@ -13,14 +13,13 @@ int main() printf("Nepodarilo sa nacitat x\n"); return 0; } - int r =0; + long double r =0; while((r=scanf("%Lf",&value)!=EOF)&&r==1){ arr[count]=value; count++; } value=0; - - for(int i =0;i=0;i++){ + for(int i =0;i=0;i++){ value+=(long double)(arr[i]*pow(x,count-1-i)); }