由此,算式4+2*3-10/5的计算顺序为4+2*3-10/5=4+6-10/5=4+6-2=8。 给定一个以“#”作为结束符的算式,求出算式的结果。 给出严蔚敏《数据结构(C语言)》中的一段算法描述以作参考: 图1:表达式求值算法 图2:表达式求值算法(续) 图3:表达式求值算法(续) 输入 以“#”结尾的表达式,运算数为正整数。
include<stdio.h> include<stdlib.h> define tstacksize 1000 define stackopen 10 define ok 1 define error 0 typedef int status;typedef struct{ char *base;char *top;int stacksize;}sqstack;//定义符号型堆栈 typedef struct{ int *base;int *top;int stacksize;}Sqstack;//定义数...