#include<stdio.h>
#include<stdlib.h>
struct Node;
typedef struct Node *PNode;
struct Node{
float coef;
int exp;
PNode next;
};
PNode createpoly()
{
PNode h = NULL, p = NULL, q;
int a,b,e;
float c;
printf("请输入系数和指数(指数从大到小):\n");
scanf("%f,%d",&c,&e);
while (e != 0 || c != 0)
{
p = (PNode)malloc(sizeof(struct Node));
p->coef = c;
p->exp = e;
p->next = NULL;
if (h == NULL)
h = p;
else
q->next = p;
q = p
多项式相加之C语言
最新推荐文章于 2023-01-24 12:04:40 发布