#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
typedef struct linkst *linkstp;
typedef struct linkst
{
int n;
int value;
linkstp p;
} linkst;
int getdigit(void);
void putdigit(int temp);
linkstp getpoly(void);
void printpoly(linkstp sp);
linkstp mulpoly(linkstp, linkstp);
linkstp addpoly(linkstp, linkstp);
int main(int argc, char **argv)
{
linkstp poly1 = getpoly();
linkstp poly2 = getpoly();
linkstp mulans = mulpoly(poly1, poly2);
printpoly(mulans);
linkstp addans = addpoly(poly1, poly2);
printpoly(addans);
return EXIT_SUCCESS;
}
linkstp addpoly(linkstp a, linkstp b)
{
if (a->p == NULL)
return b;
if (b->p == NULL)
return a;
linkstp re = (linkstp)malloc(sizeof(linkst));
re->p == NULL;
linkstp ans = re;
a = a->p;
b = b->p;
while (a != NULL && b != NULL)
{
if (a->n == b->n)
{
if (a-&g