#include<stdio.h> #include<stdlib.h> #define OK 1 #define Error 0 typedef int Status; //ջ typedef struct StackNode { char a; struct StackNode *next; }StackNode,*LinkStack; Status IniStack(LinkStack &S) { S=NULL; return OK; } Status Isempty(LinkStack &S) { if(S!=NULL) return Error; return OK; } Status Push(LinkStack &S,char e) { LinkStack p; p=new StackNode; p->a=e; p->next=S; S=p; return OK; } Status Pop(LinkStack &S,char &e) { LinkStack p; if(S==NULL) return Error; e=S->a; p=S; S=S->next; free(p); return OK; } char GetTop(LinkStack S) { if(S!=NULL) return S->a; return Error; } int pp(char a) { if(a=='/'||a=='*') return 1; return 0; } int main() { char ass[400]; LinkStack Q; int i; char k; IniStack(Q); gets(ass); for(i=0;;i++) { if(ass[i]=='