采用顺序存储的方式,实现语言为c++
#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
typedef struct polynomial
{
int factor;//系数
int indice;//指数
struct polynomial *next;
}polynomial,*LinkList;
//尾插法--带头结点
void CreateLink(LinkList &L, int n)
{
LinkList p,s;
int i;
// L = (LinkList)malloc(sizeof(polynomial));
L=new polynomial;
L->next = NULL;
p = L;
for (i = 0; i < n; i++)
{
// s = (LinkList)malloc(sizeof(polynomial));
s=new polynomial;
cout<<"enter the polynomial expo and coef in turn:";
cin>>s->