Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Would someone please give some idea about writing a program on adding two polyno

ID: 3792710 • Letter: W

Question

Would someone please give some idea about writing a program on adding two polynomials as an ordered list of terms, where the terms are ordered by their exponents. In C++

Technical Requirements

   • Use linked lists to keep track of the polynomials.

   • Use iterators to iterate through the lists.

   • Ask the user enter the polynomials in a user-friendly fashion. The polynomials should be entered as: 3X^3 – 1X^2 + 1 (You may assume there is only one variable (X) and there are no spaces).

   •   A polynomial is a list (linked list) of terms.

   •   The coefficients and powers can be more than one digit.

Explanation / Answer

The problem is much simpler when you to just add two polynomial using linked list

using struct node of this type will help you to store the coefficient and exponent of a polynomial. and also it is mentioned that only one variable of X is there. so using this sequence of the struct you can extract the polynomial.

now you traverse the list and simply add their coefficient if exponent matches as they are ordered.here is the code to get you idea.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote