(本站为飞网专业下载站,域名:down.cfei.net)
资源简介:
#include#include#includetypedef struct polynode {int coef; //多项式的系数int exp; //指数struct polynode *next; }node;node *create() //用尾插法建立一元多项式的链表{node *h,*r,*s;int c,e;h=(node*)malloc(sizeof(node)); r=h; printf("coef:");scanf("%d",&c); printf("exp: ");scanf("%d",&e); while(c!=0) //输入系数为0时,多项式的输入结束{s=(node*)malloc(sizeof(node)); s->coef=c; s->exp=e; r->next=s;r=s; printf("coef:");scanf("%d",&c);printf("exp: ");scanf("%d",&e);}r->next=NULL; return(h);}void print(node *p) //
飞网下载站,免费下载共享资料,内容涉及教育资源、专业资料、IT资源、娱乐生活、经济管理、办公文书、游戏资料等。