226 unordered_map<char, int> priority = {
231 stack<char> op = stack<char>();
232 stack<int> num = stack<int>();
233 while(!cin.eof() || !cin.fail() || !cin.bad()) {
234 if(cin.peek() == EOF)
236 if(isdigit(cin.peek())) {
243 }
else if(y ==
')') {
244 while(!op.empty() && op.top() !=
'(') {
253 }
else if(c ==
'-') {
255 }
else if(c ==
'*') {
257 }
else if(c ==
'/') {
262 }
else if(priority.find(y) != priority.end()) {
263 while(!op.empty() && op.top() !=
'(' && priority[op.top()] >= priority[y]) {
272 }
else if(c ==
'-') {
274 }
else if(c ==
'*') {
276 }
else if(c ==
'/') {
293 }
else if(c ==
'-') {
295 }
else if(c ==
'*') {
297 }
else if(c ==
'/') {