summarylogtreecommitdiffstats
path: root/logic.h
blob: c4edb8d7c840b85d7ac81d59480857d3d0c4ed37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>
#include <stack>
#include <string>
#include <vector>
#include <map>
#include <cmath>

#define M_PI 3.14159265358979323846

using namespace std;

bool valid_input(string& expression);
bool valid_brackets(string& expression);
bool valid_operation(vector<string>& postfix);
vector<string> get_token(string& expression);
vector<string> convert_to_postfix(vector<string>& tokens);
double calculate_postfix(vector<string>& postfix);