[C 프로그램] 다항식 덧셈
- 최초 등록일
- 2003.09.30
- 최종 저작일
- 2003.09
- 4페이지/ 한컴오피스
- 가격 1,000원
목차
없음
본문내용
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define IS_FULL(ptr) (!(ptr))
#define Max 100
#define COMPARE(a,b) ((a>b) ? 1 : (a<b) ? -1 : 0)
typedef struct poly_node *poly_pointer;
typedef struct poly_node{
int coef;
int expon;
poly_pointer link;
};
poly_pointer a,b,d;
poly_pointer padd(poly_pointer, poly_pointer);
void attach(int, int , poly_pointer *);
poly_pointer check(char *);
void print_list(poly_pointer);
void polysum(poly_pointer, int, char);
void main()
{
char str[Max];
int x;
a = (poly_pointer)malloc(sizeof(poly_node));
b = (poly_pointer)malloc(sizeof(poly_node));
d = (poly_pointer)malloc(sizeof(poly_node));
printf("첫번째 다항식을 입력하시오 (ex:3x(3)-2x(2)+x+1) : ");
참고 자료
없음