Evaluate a polynomial
Polynomial: The polynomial means an algebraic equation consisting of many terms involving powers of the variable.
Standard form of the polynomial is:
p(x) = a0+a1x+a2x2+a3x3+.................+anxn
Here p(x) is a function of the set of the real number and a0, a1, a2......an are real number and n is a non negative integer, and is called polynomial in x over reals.
Degree of polynomial: The highest term, which is present in the expression of the algebraic function, is called degree of the polynomial.
Example:
Zero degree polynomial (0x3+0x2+0x+0)
One-degree polynomial (x+3, 5x+6,4x+10)
Second-degree polynomial (x2+x+5, x2+6x+6)
Third degree polynomial (x3+x2+x+6,x3+1)
Algorithm:
Step 1: Start
Step 2: Take the value of the variable x and the value of the real number.
Step 3: Assign sum as zero.
Step 4. Evaluate the given expression just writing the expression.
Step 5: Print the value of the sum.
Step 6: Stop.