You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
393 B

#pragma once
#include<iostream>
#include<stack>
#include<string.h>
#include<iomanip>
#include<map>
#include<algorithm>
using namespace std;
stack<char> opr;
stack<double> in;
std::map<char, int> m;
double compute(double a, double b, char c)
{
if (c == '+') return a + b;
else if (c == '-') return a - b;
else if (c == '*') return a * b;
else if (c == '/') return a / b;
}