Find Jobs
Hire Freelancers

Linked Lists and Polynomials

$30-5000 USD

Opravljeno
Objavljeno pred več kot 19 leti

$30-5000 USD

Plačilo ob dostavi
**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.
ID projekta: 3399420

Več o projektu

10 ponudb
Projekt na daljavo
Aktivno pred 20 leti

Želite zaslužiti?

Prednosti oddajanja ponudb na Freelancerju

Nastavite svoj proračun in časovni okvir
Prejmite plačilo za svoje delo
Povzetek predloga
Registracija in oddajanje ponudb sta brezplačna
Dodeljeno:
Avatar uporabnika
See private message.
$12 USD v 5 dneh
5,0 (143 ocen)
5,9
5,9
10 freelancerjev je oddalo ponudbo s povprečno vrednostjo $22 USD za to delo
Avatar uporabnika
See private message.
$17,85 USD v 5 dneh
5,0 (109 ocen)
6,1
6,1
Avatar uporabnika
See private message.
$25,50 USD v 5 dneh
4,9 (212 ocen)
5,8
5,8
Avatar uporabnika
See private message.
$72,25 USD v 5 dneh
4,7 (67 ocen)
6,1
6,1
Avatar uporabnika
See private message.
$11,05 USD v 5 dneh
4,9 (35 ocen)
4,2
4,2
Avatar uporabnika
See private message.
$15,30 USD v 5 dneh
5,0 (30 ocen)
4,3
4,3
Avatar uporabnika
See private message.
$14,95 USD v 5 dneh
4,1 (72 ocen)
4,4
4,4
Avatar uporabnika
See private message.
$7,65 USD v 5 dneh
5,0 (18 ocen)
3,1
3,1
Avatar uporabnika
See private message.
$11,05 USD v 5 dneh
4,9 (10 ocen)
2,3
2,3
Avatar uporabnika
See private message.
$34 USD v 5 dneh
2,9 (3 ocen)
1,3
1,3

O stranki

Zastava UNITED STATES
New Smyrna Beach, United States
5,0
3
Član(ica) od okt. 6, 2004

Verifikacija stranke

Hvala! Po e-pošti smo vam poslali povezavo za prevzem brezplačnega dobropisa.
Pri pošiljanju vašega e-sporočila je šlo nekaj narobe. Poskusite znova.
Registrirani uporabniki Skupaj objavljenih del
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Nalaganje predogleda
Geolociranje je bilo dovoljeno.
Vaša prijavna seja je potekla, zato ste bili odjavljeni. Prosimo, da se znova prijavite.