该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
/*数据结构多项式加法用C语言的完美实现,书43页 算法 2.23[ 数据结构(C语言版) 严尉敏主编]*/
/*注释就不加了,本程序的所有函数书上都有说明*/
/*本程序Tourboc 2.0编译通过*/
#include
#include
#include
#include
#define TURE 1
#define FALSE 0
#define OK 1
typedef int status;
typedef struct {
float coef;
int expn;
}term,ElemType;
typedef struct LNode {
ElemType data;
struct LNode *next;
}*link,*Position,NodeType;
typedef struct {
link head,tail;
int len;
}linklist;
typedef linklist polynomial;
Position Nextpos(linklist *l,link p)
{ if(l->head&&p->next) return(p->next);
else return NULL;
}
int cmp(term a,term b)
{ if(a.expn>b.expn) return 1;
e