What is the errors here? correct it please
//Evaluate the postfix expression//623+-382/+*2&3+
#include#include#includeusing namespace std;void push(long int character);long int postfix_evaluation();int pop();int isEmpty();int top;long int stack[50];char postfix_expression[50];int main(){long int evaluated_value;top = -1;cout<"\nenter an="" expression="" in="">"\nenter>format:\t";cin>>postfix_expression;cout<"\nexpression in="" postfix="">"\nexpression>\t"<><>evaluated_value = postfix_evaluation();cout<"\nevaluation of="" postfix="">"\nevaluation>\t" <><>system("pause");return 0;}long int postfix_evaluation(){double x, y, temp, value;int count;for(count = 0; count strlen(postfix_expression); count++){if(postfix_expression[count] <= '9'="">=>postfix_expression[count] >= '0'){push(postfix_expression[count] - '0');}else{x = pop();y = pop();switch(postfix_expression[count]){case '+': temp = y + x;break;case '-': temp = y - x;break;case '*': temp = y * x;break;case '/': temp = y / x;break;case '&': temp = pow(y, x);break;case '^': temp = pow(y, x);break;default: cout<>}push(temp);}}value = pop();return value;}void push(long int character){if(top > 50){cout<"stack>"stack>exit(1);}top = top + 1;stack[top] = character;}int pop(){if(isEmpty()){cout<"stack is="">"stack>exit(1);}return(stack[top--]);}int isEmpty(){if(top == -1){return 1;}else{return 0;}}
break;case '*': temp = y * x;break;case '/': temp = y / x;break;case '&': temp = pow(y, x);break;case '^': temp = pow(y, x);break;default: cout<>}push(temp);}}value = pop();return value;}void push(long int character){if(top > 50){cout<"stack>"stack>exit(1);}top = top + 1;stack[top] = character;}int pop(){if(isEmpty()){cout<"stack is="">"stack>exit(1);}return(stack[top--]);}int isEmpty(){if(top == -1){return 1;}else{return 0;}}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here