Find Jobs
Hire Freelancers

Linked Lists and Polynomials

$30-5000 USD

Completed
Posted over 19 years ago

$30-5000 USD

Paid on delivery
**Create:** This function will construct a new polynomial. It will require the user to input the pairs which correspond to the coefficient and exponent pairs that comprise the polynomial. This new polynomial is simply appended to your list of polynomials. (Hint: This function should most likely return a pointer to the first node in the list storing the newly created polynomial.) **print (p): ** This function will produce a nice looking mathematical format for the polynomial *p* printed with the largest exponent term first (leftmost printed term) down through the constant term. (Don’t worry about printing exponents in smaller print and proper position ??" use form shown below.) NOTE: this function does not alter the list representing the polynomial. It simply prints it out in the proper order (as the polynomial is already stored). *example:* print called on the fourth polynomial listed in the figure will print: 61x^4 -9x^2 **differentiate (p):** This function will produce the derivative of the polynomial with respect to *x*. The derivative is obtained by differentiating each term in the polynomial with respect to *x.* The derivative that you produce will be stored in a new polynomial (one of the total 15 you have available). *example:* differentiate called on the first polynomial listed on the figure will produce the list {(118, 1), (41, 0)}. (Hint: Your function should taken in a pointer to the first node in a polynomial, create a new linked list structure that stores the corresponding derivative, and then returns a pointer to the first node in this newly created derivative.) ## Deliverables **_User Input Specification _**1. You will provide the following menu to the user to make a choice. This menu will be provided only once in the beginning and not every time the user is required to enter an option: | Creation and Manipulation of polynomials using linked lists 1. Create a new polynomial. 2. Print an existing polynomial. 3. Differentiate an existing polynomial. 4. End session. ENTER YOUR OPTION: | The create function will prompt the user to enter a set of ordered pairs representing the polynomial. The print and differentiate functions will request the user enter an integer number (between 1 and 15) indicating which polynomial is to be printed or differentiated. Notice that the differentiate function creates a new polynomial and will need to know the proper location in the list to insert the new polynomial. When the user enters option 4, print out all the polynomials currently in the system , print GOOD BYE ! and terminate the program. **Input Specifications and Error Checking:** Assume that the user will choose proper menu choices and will enter all polynomials perfectly. Thus assume that the user properly enters the number of terms they are entering(a positive integer), and does NOT enter two terms with the same exponent. Furthermore, each exponent entered will be a non-negative integer and each coefficient entered will be a non-zero integer. However, a user may attempt to print or differentiate a polynomial that does not exist. In this case, simply print out an error message that states the polynomial doesn't exist and print out the main menu **_Output:_ ** Only the print and end functions actually produce output. You may, if you wish, have the create and differentiate functions print a message that they have completed their task. **Output Specification:** Follow the example provided below as closely as possible. In particular, when printing out a polynomial, only print out leading minus signs. Preceding all other positive terms, print a plus sign. For all negative terms, do NOT precede them with a plus sign. Also, if the coefficient of a term is 1, do not print out a one preceding the term. Thus, the polynomial {(2,3), (-1, 1)} should be printed as 2x^3 -x and not 2x^3 + -x or 2x^3 -1x.) Notice that there is one space between each term and the following term or plus sign and one space in between a plus sign and the its following term. See file for full details ## Platform Plain C source file (must be well commented in English). Windows/DOS executable.
Project ID: 3399420

About the project

10 proposals
Remote project
Active 20 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$12 USD in 5 days
5.0 (143 reviews)
5.9
5.9
10 freelancers are bidding on average $22 USD for this job
User Avatar
See private message.
$17.85 USD in 5 days
5.0 (109 reviews)
6.1
6.1
User Avatar
See private message.
$25.50 USD in 5 days
4.9 (212 reviews)
5.8
5.8
User Avatar
See private message.
$72.25 USD in 5 days
4.7 (67 reviews)
6.1
6.1
User Avatar
See private message.
$11.05 USD in 5 days
4.9 (35 reviews)
4.2
4.2
User Avatar
See private message.
$15.30 USD in 5 days
5.0 (30 reviews)
4.3
4.3
User Avatar
See private message.
$14.95 USD in 5 days
4.1 (72 reviews)
4.4
4.4
User Avatar
See private message.
$7.65 USD in 5 days
5.0 (18 reviews)
3.1
3.1
User Avatar
See private message.
$11.05 USD in 5 days
4.9 (10 reviews)
2.3
2.3
User Avatar
See private message.
$34 USD in 5 days
2.9 (3 reviews)
1.3
1.3

About the client

Flag of UNITED STATES
New Smyrna Beach, United States
5.0
3
Member since Oct 6, 2004

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.