2
This commit is contained in:
parent
336628341f
commit
2dbcd57084
@ -17,8 +17,12 @@ int main() {
|
|||||||
printf("Chyba: Neplatná hodnota x.\n");
|
printf("Chyba: Neplatná hodnota x.\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
double coefficients[] = {57.0};
|
|
||||||
int degree = 1;
|
// Pole koeficientov
|
||||||
|
double coefficients[] = {2, 1, 1}; // Zmena koeficientov
|
||||||
|
|
||||||
|
// Počet koeficientov
|
||||||
|
int degree = sizeof(coefficients) / sizeof(coefficients[0]);
|
||||||
|
|
||||||
double result = evaluate_polynomial(x, coefficients, degree - 1);
|
double result = evaluate_polynomial(x, coefficients, degree - 1);
|
||||||
printf("Vysledok je: %.2f\n", result);
|
printf("Vysledok je: %.2f\n", result);
|
||||||
|
Loading…
Reference in New Issue
Block a user