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)); }