Aktualizovat „a1/program.c“

This commit is contained in:
Bohdan Yanchyk 2020-03-15 17:39:37 +00:00
parent 028aeecd5f
commit 50643d1153

View File

@ -16,14 +16,14 @@ int main()
count++; count++;
} }
value=0; value=0;
for(int i =0;i<count-1;i++){ for(int i =0;i<count;i++){
value+=arr[i]*pow(x,count-1-i); value+=arr[i]*pow(x,count-1-i);
} }
if(value>=40000){ if(value>=40000){
value =((int)(value*100 - 0.5)/100.00); value =((int)(value*100 - 0.5)/100.00);
} }
printf("Vysledok je :%.2Lf\n",value); printf("Vysledok je :%.2lf\n",value);
return 0; return 0;