레포트 (32)
[컴공]singly linked list,postfix
2. 문자열(character string)에 저장된 infix 형태의 수식(expression)을 받아서 singly linked list로 구성한 후, postfix 형태로 바꾸어라.#include #include #include #define MAX 100typedef union opchar operate;int operand; OP;typedef struct node *nodepointer;typedef struct node int no;OP data;nodepointer link; nodeT;int Isnum
5페이지 | 0원 | 2004.05.19
[전산] 프로그램 INFIX 2 POSTFIX 에러체크
FILE:POSTFIX.C/* Infix notation to Postfix notation Program *//* Computer Science & Engineering DEP. *//* AV930996 Oh Jang Wook */#include #define MAX 80char exprMAX,operstkMAX,expr2MAX;int top;int isp(char c);int icp(char c);void add(char c);char delete(void);void postfix(void);int error1(void);int error2(void);int isp(c)char c;switch(c)case^:return(3);ca
0페이지 | 0원 | 2004.05.19
postfix(char *s); // 후위식을 받아오는 함수.node *Getparsetree(char *p); // 수식나무를 생성하는 함수.void printfinfix(node *t); // 수식나무를 통해 중위식을 출력하는 함수.void Pushparenthesis(); // 중위식 출력때 쓰일 괄호를 스택에 넣어주는 함수.void visit(char *s); // 노드를 방문하는 함수.int isoperator(int k); // 연산
5페이지 | 1,200원 | 2007.11.07
postfix(char *dst, char *src); //중위형 수식을 후휘형 수식으로 바꿈//double calc(char *p); //후휘형 수식을 연산하여 리턴//void main()double r;char inform256;char exp256;int c,i=0;while(informi!=x)printf(\n\nCalc = );while ( (c=getchar()) != \n)if (c != ) //수식의 공백 제거//informi++=c;informi=\0;postfix(exp, inform);//
10페이지 | 1,000원 | 2008.01.06