º»¹®/³»¿ë
#include
#include
#include
#define COMPARE(x,y) (((x)<(y) ? -1 : ((x)==(y)) ? 0 : 1)
#define IS_FULL(ptr) (!(ptr))
#define IS_MEPTY(ptr) (!(ptr))
typedef struct poly_node *poly_pointer;
typedef struct poly_node{
int coef;
int expon;
poly_pointer link;
}; //³ëµå ¼±¾ð¹®
poly_pointer creat_node(); //´ÙÇ×½Ä »ý¼º ÇÔ¼ö
poly_pointer padd(poly_pointer a, poly_pointer b); //´ÙÇ×½Ä µ¡¼À ÇÔ¼ö
void attach(int coef, int expon, poly_pointer *ptr); //³ëµå »ý¼º, ¿¬°á ÇÔ¼ö
void print_poly(poly_pointer front); //´ÙÇ×½Ä Ãâ·Â ÇÔ¼ö
void main(void){
printf(` ** ¸µÅ©µå ¸®½ºÆ®¸¦ ÀÌ¿ëÇÑ ´ÙÇ×½Ä µ¡¼À ** \\n`);
poly_pointer a, b, d; //a, b, dÀÇ ´ÙÇ×½Ä Æ÷ÀÎÅÍ »ý¼º
printf(` A node ÀÇ`);
a=creat_node(); //a ´ÙÇ×½Ä »ý¼º
printf(`\\n B ´ÙÇ×½Ä =`);
b=creat_node(); //b ´ÙÇ×½Ä »ý¼º
d=padd(a,b); //a + b ÇÏ¿© d ´ÙÇ×½Ä »ý¼º
printf(`\¡¦(»ý·«)