Question: Write a program C++ Program that asks the user to input two polynomials P1 and P2 (possibly of different degree). finds the smallest non-negative integer

Write a program C++ Program that

asks the user to input two polynomials P1 and P2 (possibly of different degree).

finds the smallest non-negative integer number x when the first polynomial exceeds the second (P1(x) > P2(x)).

To test your program: There is a property of the polynomials with non-negative coefficients that eventually the polynomial of the higher degree will exceed the polynomial of the lower degree (regardless of what the coefficients are). Check that this is the case, report your tested cases in the comments. (Be careful to make sure that your test cases dont cause integer overflows and other non-mathematical results. Feel free to use WolframAlpha or other external resources to find good polynomials for the tests.)

All dynamically allocated memory must be released by the end of the program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!