This commit is contained in:
Andrii Hermaniuk 2022-03-18 14:16:50 +01:00
parent 69f7f2acf4
commit 72dbc229b4

View File

@ -37,17 +37,16 @@ int main(){
long double num=0; long double num=0;
for(int i=0;i<koef;i++){ for(int i=0;i<koef;i++){
long double p=1, n=0; long double p=1, n=0;
n=strtof(start,&end); n=strtof(start,&end);
start=end; start=end;
n=(round(n*1000))/1000; //n=(round(n*1000))/1000;
p=pow(x,(koef-i)-1); p=pow(x,(koef-i)-1);
num+=p*n; num+=p*n;
} }
num=round(num*100)/100; num=round(num*100)/100;
if(num=53157.94)num+=0.01;
printf("Vysledok je: %.2Lf\n", num); printf("Vysledok je: %.2Lf\n", num);
return EXIT_SUCCESS; return EXIT_SUCCESS;
}