Aktualizovat „a1/program.c“

This commit is contained in:
Bohdan Yanchyk 2020-03-15 18:23:41 +00:00
parent e8358d9de9
commit 59488fd26a

View File

@ -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<count&&count-1-i>=0;i++){
for(int i =0;i<count&&count-1-i>=0;i++){
value+=(long double)(arr[i]*pow(x,count-1-i));
}