i have a project in c++,it is about horner's method,and the program should run it.
but i don't know what the program should want from user or do
could you plz just give me a suggestion about coding this program?
Horner's method is a technique for evaluating polynomials.
It uses nested multiplication instead of exponentiation.
For example, the fourth-degree polynomial
P(x) = a4 * x^4 + a3 * x^3 + a2 * x^2 + a1 *x + a0
can be written in the 'nested multiplication' form
P(x) = ( ( ( ( a4 * x + a3 ) * x ) + a2 ) * x + a1 ) * x + a0
so your program should accept an nth-degree polynomial from the user and could do things like:
a. evaluate it for a particular value of x
b. find its roots
you would find other examples of using Horner algorithm (floating point division, radix conversion) in the wiki article.