数据结构程实施方案.docVIP

  • 0
  • 0
  • 约4万字
  • 约 46页
  • 2019-03-12 发布于江苏
  • 举报
个人收集整理 仅供参考学习 个人收集整理 仅供参考学习 PAGE / NUMPAGES 个人收集整理 仅供参考学习 第10章 数据结构课程设计 10.2.1 一元稀疏多项式计算器参考答案 #define NULL 0 typedef struct node /* 定义多项式每一项 */ { float c; /* c为系数 */ int e; /* e为指数 */ struct node *next; /* next指向下一项 */ }dnode; dnode *creat() /* 用链表存放多项式(带头结点) */ { dnode *h,*p; int e,i,n; /* n多项式地项数 */ float c; h=(dnode *)malloc(sizeof(dnode)); /* 分配头结点 */ h-next=NULL; do /* 当n小于1,则重新输入 */ { printf(enter n:); scanf(%d,n); }while(n1); for(i=1;i=n;i++) { printf(enter %d c e:,i); scanf(%f%d,c,e); p=(dnode *)malloc(sizeof(dnode)

文档评论(0)

1亿VIP精品文档

相关文档