Write a program in Java to implement Horner’s algorithm. Inother words, your program should evaluate the polynomial p(x) =anxn + an-1 Xn-1 + … +a1x + a0 at a given point x.
Your program should prompt the user to enter the coefficients ofthe polynomial from the lowest degree to the highest degree and thenumber x. For example, to evaluate p(x) = 2×4 –x3 + 3×2 + x – 5 at x = 3, the user wouldinput: -5 1 3 -1 2 and 3. Your program should display thecoefficients of the polynomial and output the value of thepolynomial at x. For example,
OR
OR