#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define ERROR 0
#define OK 1
typedef struct pNode //建立一元多项式
{
int coef; //系数
int exp;//指数
struct pNode* link;
}pNode;
typedef struct
{
int n;
struct pNode *head;
}polynominal;
void Create(polynominal *p) //生成表头结点
{
pNode *pn,*pre,*q;
p->head=malloc(sizeof(pNode));
p->head->exp=-1;
p->head->link=NULL;
for(;;)
{
pn=malloc(sizeof(pNode));
printf("coef:\n");
scanf("%d",&pn->coef); //输入项的系数
printf("exp:\n");
scanf("%d",&pn->exp);