文件名称:YiYuanDuoXiangShi
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:1.05kb
-
已下载:1次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
1.一元多项式相加(10分)
题目说明:
编写一元多项式加法运算程序。要求用线性链表存储一元多项式(参照课本)。该程序有以下几个功能:
1. 多项式求和
输入:输入三个多项式,建立三个多项式链表Pa、Pb、Pc
(提示:调用CreatePolyn(polynomial &P,int m)。
输出:显示三个输入多项式Pa、Pb、Pc、和多项式Pa+Pb、多项式Pa+Pb+Pc
(提示:调用AddPolyn(polynomial &Pa, polynomial Pb), 调用PrintPolyn(polynomial P))。
0. 退出
输入:
根据所选功能的不同,输入格式要求如下所示(第一个数据是功能选择编号,参见测试用例):
1
多项式A包含的项数,以指数递增的顺序输入多项式A各项的系数(整数)、指数(整数)
多项式B包含的项数,以指数递增的顺序输入多项式B各项的系数(整数)、指数(整数)
多项式C包含的项数,以指数递增的顺序输入多项式C各项的系数(整数)、指数(整数)
0 ---操作终止,退出。
输出:
对应一组输入,输出一次操作的结果(参见测试用例)。
1 多项式输出格式:以指数递增的顺序输出: <系数,指数>,<系数,指数>,<系数,指数>,参见测试用例。零多项式的输出格式为<0,0>
0 无输出-Title Descr iption:
Preparation of a polynomial addition operation procedures. Asked to use linked list to store a polynomial (see textbook). The program has the following features:
1 polynomial sum
Input: Input three polynomials, the establishment of three polynomial list Pa, Pb, Pc
(Hint: call CreatePolyn (polynomial & P, int m).
Output: Displays the three input polynomials Pa, Pb, Pc, and the polynomial Pa+ Pb, polynomial Pa+ Pb+ Pc
(Hint: call AddPolyn (polynomial & Pa, polynomial Pb), call PrintPolyn (polynomial P)).
0 Exit
Input:
Depending on the function of different input format requirements are as follows (data is a function of the first selection number, see test case):
1
A number of items contained in the polynomial, exponential increase in the order of the input coefficients of the polynomial A (integer) index (integer)
Polynomial B contains the number of items to index in ascending order of the input coefficients of the polynomial B (integer) index (integer)
Po
题目说明:
编写一元多项式加法运算程序。要求用线性链表存储一元多项式(参照课本)。该程序有以下几个功能:
1. 多项式求和
输入:输入三个多项式,建立三个多项式链表Pa、Pb、Pc
(提示:调用CreatePolyn(polynomial &P,int m)。
输出:显示三个输入多项式Pa、Pb、Pc、和多项式Pa+Pb、多项式Pa+Pb+Pc
(提示:调用AddPolyn(polynomial &Pa, polynomial Pb), 调用PrintPolyn(polynomial P))。
0. 退出
输入:
根据所选功能的不同,输入格式要求如下所示(第一个数据是功能选择编号,参见测试用例):
1
多项式A包含的项数,以指数递增的顺序输入多项式A各项的系数(整数)、指数(整数)
多项式B包含的项数,以指数递增的顺序输入多项式B各项的系数(整数)、指数(整数)
多项式C包含的项数,以指数递增的顺序输入多项式C各项的系数(整数)、指数(整数)
0 ---操作终止,退出。
输出:
对应一组输入,输出一次操作的结果(参见测试用例)。
1 多项式输出格式:以指数递增的顺序输出: <系数,指数>,<系数,指数>,<系数,指数>,参见测试用例。零多项式的输出格式为<0,0>
0 无输出-Title Descr iption:
Preparation of a polynomial addition operation procedures. Asked to use linked list to store a polynomial (see textbook). The program has the following features:
1 polynomial sum
Input: Input three polynomials, the establishment of three polynomial list Pa, Pb, Pc
(Hint: call CreatePolyn (polynomial & P, int m).
Output: Displays the three input polynomials Pa, Pb, Pc, and the polynomial Pa+ Pb, polynomial Pa+ Pb+ Pc
(Hint: call AddPolyn (polynomial & Pa, polynomial Pb), call PrintPolyn (polynomial P)).
0 Exit
Input:
Depending on the function of different input format requirements are as follows (data is a function of the first selection number, see test case):
1
A number of items contained in the polynomial, exponential increase in the order of the input coefficients of the polynomial A (integer) index (integer)
Polynomial B contains the number of items to index in ascending order of the input coefficients of the polynomial B (integer) index (integer)
Po
(系统自动生成,下载前可以参看下载内容)
下载文件列表
YiYuanDuoXiangShi.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.