多项式相加减.docVIP

  • 7
  • 0
  • 约9.4万字
  • 约 10页
  • 2016-12-25 发布于河南
  • 举报
#include iostream #include cstddef #include malloc.h #include string using namespace std; struct node { int coef; int inde; node *next; }; typedef node* nodeptr; int Insert(nodeptr head,nodeptr p,int i) { nodeptr temp; temp=head; if(i==0) { while(temp-next!=NULL) { temp=temp-next; } temp-next=p; } else{ for(int j=1;j=i;j++) temp=temp-next; if(temp) { p-next=temp-next; temp-next=p; } else { coutêy?Y3¤?è′í?ó£?; return 0; } } return 1; } int output(nodeptr head) { nodeptr temp; temp=head; string str=; char buffer[20]; if(head-next!=NULL)

文档评论(0)

1亿VIP精品文档

相关文档