大家帮忙看看丑,有错立即指出

第三方登录:大家帮忙看看这段C语言程序有什么错误_百度知道
大家帮忙看看这段C语言程序有什么错误
3;}LinkStack *Pop(LinkStack *top, x1 * x2):
OPND = Push(OPND;,3:
OPND = Push(OPND, x1 - x2);):
OPND = Push(OPND; p = (LinkStack *)malloc(sizeof(LinkStack));stdio,1,0;
p-&gt, case&#39,3;stdlib,3,1;, &temp);,3;('
ch = getchar();pause&quot,2;
break:return 2, StackElementType *elem){ LinkStack *&#47,1;;data =-'RESULT=%d&#92.h&gt!\ printf(&quot,3:NO MORE STORAGE SPACE;
case&#39, 'n&quot,3:return 1,3;
exit(0), &x1),3;
, &x2)!\INPUT THE EXPRESSION;; case'
*elem = top-&
OPND = Pop(OPND;-&#39,3; while (!(ch == '#include&lt:return 0; } printf(&quot,2}: 1:
OPND = Push(OPND,1; || ch == ';/ OPTR = Push(OPTR; if (IsEmpty(top)) {
printf(& ch = getchar();)
i = sub(GetTop(OPTR));
OPND = Pop(OPND;
if (priority[i][j] == 2)OPTR = Pop(OPTR;n&),3,1, &op);next = top,3, x1 / struct node *next,3;+' || ch == '*' case'
-&#39,3, ch - 48),FAIL TO POP;+'#'
else OPND = Push(OPND; x2); system(&quot, case' } else return top-&gt,1:return 5;&&GetTop(OPTR) == '); || ch == &#39,1;):&quot.h&n&quot,0;
return NULL;+&#39,3;data, GetTop(OPND));
case&#39, op,3;'
case&#39,1,3;}LinkStack *Push(LinkStack *top,3,3; }}void main(){ StackElementType x1; LinkStack *OPND = NULL;;
top =}LinkS)'
top = top-& }
j = sub(ch),FAIL TO LOAD;int priority[7][7] = {3;#&#39:return 3;*''ERROR;('
if(priority[i][j]==3)
OPTR = Pop(OPTR,1;;typedef int StackElementT }}StackElementType GetTop(LinkStack *top){ if (IsEmpty(top)) {
printf(&&#47#include&)) {
if (ch == &#39,1;ERROR;
); case&#39,1,3;);)&#39,1;#&#39,3;n&
case&#39? 0 ,2;
switch (op)
case' if (p) {
p-&gt!\*'
int IsEmpty(LinkStack *top){ return top ,1;:EMPTY STACK; LinkStack *OPTR = NULL, i,3:EMPTY STACK; || ch == ';
free(temp); || ch == '}int sub(StackElementType c){ switch (c) { case&#39,1;#' } else {
temp = top:return 6,1:return 4; || ch == &#39,1; } else {
if (priority[i][j] == 1)OPTR = Push(OPTR, ch), StackElementType x){ LinkStack *p;;typedef struct node{ StackElementType data,1,3;&#39, x1 + x2);#'ERROR, x2,3,1,3
提问者采纳
==&=&nbsp.,&&nbsp.;i;x1; OPTR&nbsp,&nbsp..; while&=&nbsp,&THE&nbsp..;*)malloc(sizeof(LinkStack));Push(OPTR.;&#39.,&nbsp.;(LinkStack&nbspvoid&nbsp.;{ StackElementType&nbsp..;*)malloc(sizeof(LinkStack));*OPND&需要分配空间 LinkStack&*OPTR&j;))&=&nbsp.; LinkStack& printf(&quot,& char&nbsp.;GetTop(OPTR)&nbsp:&{ ..;=&&#&#39!(ch&getchar(); ch&);(LinkStack&&#39..;#');'//&#'INPUT&&amp,&(;==&x2;EXPRESSION;main()&nbsp
我输入了1+1 回车以后没反应
不输出结果
以#结束,如2+3-6#我在main()函数中增加了两行,用来滤除空白符,这样一来,表达式中的空白符都被滤除,所以你可以这样输入表达式2 + 3 * 5 - 6 / 2##include&&ctype.h&&//&for&isspace()//&...................void&main()&{ StackElementType&x1,&x2,&i,&j,&op,& char& LinkStack&*OPTR&=&(LinkStack&*)malloc(sizeof(LinkStack)); LinkStack&*OPND&=&(LinkStack&*)malloc(sizeof(LinkStack)); OPTR&=&Push(OPTR,&'#'); printf(&INPUT&THE&EXPRESSION:&); ch&=&getchar(); while&(!(ch&==&'#'&&&&GetTop(OPTR)&==&'#'))&{
if(isspace(ch))&{
ch&=&getchar();
} &&&&//&...... } }
其他类似问题
为您推荐:
c语言程序的相关知识
其他1条回答
看不出来是什么错误,
好像可能大概是main函数出了错误。。
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁大家帮忙看看这句话,没有错 Telephone makes more convenience to_百度知道
大家帮忙看看这句话,没有错 Telephone makes more convenience to
大家帮忙看看这句话,没有错 Telephone makes m珐粻粹救诔嚼达楔惮盲ore convenience to communicate with friends
提问者采纳
Convenient
提问者评价
太给力了,你的回答完美地解决了我的问题,非常感谢!
其他类似问题
为您推荐:
其他1条回答
尊敬的联想用户您好!
Telephone makes more convenience to这句话的意思是手机更方便,我认为这句珐粻粹救诔嚼达楔惮盲话没有错,在有的时候,手机真的很方便。更多问题您可以咨询联想智能机器人:如果没有解决您的问题可以吐槽提出您宝贵的意见,再转人工服务。期待您满意的评价,感谢您对联想的支持,祝您生活愉快!
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁大家正在求推荐
&·&·&·&·&·&·
(13人参加)
(12人参加)
第三方登录:

我要回帖

更多关于 大家来帮忙 的文章

 

随机推荐