Question: A function called evalPolynomial with two parameters: a polynomial P and a real number X. The function should evaluate P at x = X and
A function called evalPolynomial with two parameters: a polynomial P and a real number X. The function should evaluate P at x = X and return the result. For example, if P is the polynomial 12x 6 + 5x 5 20x 4 + 8x 2 12x + 9, then evalPolynomial(P, 2) should return -911 (which we obtain by plugging in 2 as the value of x).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
