Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include<iostream>#include<stack>using namespace std;int main(){int number;char ch;stack<char> op;stack<int> operand;while(cin>>ch){if(ch >= '0' && ch <= '9'){cin.unget();cin>>number;operand.push(number);}else{if(ch == '(' || op.empty()) op.push(ch);else if(ch == '*' || ch == '/'){while(!op.empty() && (op.top() == '*' || op.top() == '/')){int b = operand.top();operand.pop();int a = operand.top();operand.pop();char t = op.top();op.pop();if(t == '*') a = a*b;