From 92a0a16cd84f982607590c8aecd9bff91095d0d9 Mon Sep 17 00:00:00 2001 From: Bohdan Yanchyk Date: Sun, 15 Mar 2020 17:41:21 +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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a1/program.c b/a1/program.c index 66c232f..69e188e 100644 --- a/a1/program.c +++ b/a1/program.c @@ -6,7 +6,7 @@ int main() double x=0; double value =0; int count =0; - double arr[50]; + double arr[50]={0}; scanf("%lf",&x); while(scanf("%lf",&value)!=EOF){ if(isalpha(value)!=0){ @@ -16,7 +16,7 @@ int main() count++; } value=0; - for(int i =0;i=0;i++){ value+=arr[i]*pow(x,count-1-i); }