From 1f9919819697994cc77a3677ea2503e457bac269 Mon Sep 17 00:00:00 2001 From: Bohdan Yanchyk Date: Sun, 15 Mar 2020 17:57:27 +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 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/a1/program.c b/a1/program.c index 825dacf..ab559f8 100644 --- a/a1/program.c +++ b/a1/program.c @@ -6,18 +6,18 @@ int main() double x=0; long double value =0; int count =0; - double arr[50]={0}; + long double arr[50]={0}; scanf("%lf",&x); while(scanf("%Lf",&value)!=EOF){ - if(isalpha(value)!=0){ - return 0; - } - arr[count]=(double)value; + //if(isalpha(value)!=0){ + // return 0; + //} + arr[count]=value; count++; } value=0; for(int i =0;i=0;i++){ - value+=arr[i]*pow(x,count-1-i); + value+=(long double)(arr[i]*pow(x,count-1-i)); } if(value>=40000&&value<=1000000){