


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Assigned: Monday, Dec 1st, 2008
th
Please Note: Any compilation error will be subjected to at least 50% penalty of the assignment grade.
struct term{ float coef; int exp; term *next; }
Example:
Please enter your base polynomial:
Please enter exponent of the term (-1 if you are done): > 123000 Please enter coefficient of the term > 0.
Please enter exponent of the term (-1 if you are done): > 1 Please enter coefficient of the term > 2
Please enter exponent of the term (-1 if you are done): > 3 Error, you have already entered a term with degree 1, you should enter a strictly smaller exponent!
Please enter exponent of the term (-1 if you are done): > -
You are done entering base polynomial! The provided polynomial is:
0.5 * x^123000 + 2 * x
Please enter an option: ‘A’: Add a polynomial to base ‘M’: Multiply a polynomial with base ‘D’: Delete a specific term ‘Q’: Quit
> A
Please enter exponent of the term (-1 if you are done): > 1000 Please enter coefficient of the term > 3
Please enter exponent of the term (-1 if you are done): > 0
Deletion is done. Resulting base polynomial is:
0.5 * x^123002 + 2 * x^3 + 9 * x^
Please enter an option: ‘A’: Add a polynomial to base ‘M’: Multiply a polynomial with base ‘D’: Delete a specific term ‘Q’: Quit
> Q
You have chosen to quit. Final base polynomial is:
0.5 * x^123002 + 2 * x^3 + 9 * x^
Instructions for submitting Assignment 13