Find Jobs
Hire Freelancers

Linked Lists and Polynomials

$30-5000 USD

已完成
已发布超过 19 年前

$30-5000 USD

货到付款
**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: 3399420

关于此项目

10提案
远程项目
活跃20 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
颁发给:
用户头像
See private message.
$12 USD 在5天之内
5.0 (143条评论)
5.9
5.9
10威客以平均价$22 USD来参与此工作竞价
用户头像
See private message.
$17.85 USD 在5天之内
5.0 (109条评论)
6.1
6.1
用户头像
See private message.
$25.50 USD 在5天之内
4.9 (212条评论)
5.8
5.8
用户头像
See private message.
$72.25 USD 在5天之内
4.7 (67条评论)
6.1
6.1
用户头像
See private message.
$11.05 USD 在5天之内
4.9 (35条评论)
4.2
4.2
用户头像
See private message.
$15.30 USD 在5天之内
5.0 (30条评论)
4.3
4.3
用户头像
See private message.
$14.95 USD 在5天之内
4.1 (72条评论)
4.4
4.4
用户头像
See private message.
$7.65 USD 在5天之内
5.0 (18条评论)
3.1
3.1
用户头像
See private message.
$11.05 USD 在5天之内
4.9 (10条评论)
2.3
2.3
用户头像
See private message.
$34 USD 在5天之内
2.9 (3条评论)
1.3
1.3

关于客户

UNITED STATES的国旗
New Smyrna Beach, United States
5.0
3
会员自10月 6, 2004起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。