Write an algorithm describing the steps you would use to analyze this polynomial
ID: 3637105 • Letter: W
Question
Write an algorithm describing the steps you would use to analyze this polynomial:3x3 - 5x2 + 6
Do not code this problem in C. Instead, deliver the algorithm to solve the problem. After writing the algorithm, remember to show your work testing the algorithm using the value of 2 for x given above and show the calculations that occur at each step of the algorithm, as well as the final answer.
Explanation / Answer
Step 1: Declare variable X, P,Q R Step2: Take value of X from the user Step3: Compute 3* x*x*x*x and store at P Step4: Compute 5* x*x and store at Q Step 5: Finally compute P-Q+6 and store at R Step6: Display R Step7: Stop Example: Step 1: Declare variable X, P,Q R Step2: Take value of X from the user----- Here user give 2 so x=2 Step3: Compute 3* x*x*x*x and store at P---- P=3*2*2*2 => P=24 Step4: Compute 5* x*x and store at Q --------Q= 5*2*2 => Q=20 Step 5: Finally compute P-Q+6 and store at R------- R=24-20+6 => R=10 Step6: Display R ----------------------------------------Display 10, that is the result Step7: Stop---------------------------------------------- Terminate process
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.