Go: package main

import (
	"bufio"
	"fmt"
	"go/token"
	"go/types"
	"os"
	"strconv"
	"strings"
)

func main() {
	stdin := bufio.NewScanner(os.Stdin)
	stdin.Scan()
	n, _ := strconv.Atoi(stdin.Text())
	for i := 0; i < n; i++ {
		stdin.Scan()
		exp := strings.TrimRight(stdin.Text(), "=")
		res, _ := types.Eval(token.NewFileSet(), nil, token.NoPos, exp)
		fmt.Println(res.Value)
	}
}

Python: import sys
#from me.io import dup_file_stdin

def prec(op):
    if op in "+-":return 1
    if op in "*/":return 2
    raise NotImplementedError()
    
def postFix(expr):
    stack = []
    operators = []
    num = 0
    isdigit = False
    for ch in expr:
        if ch.isdigit():
            isdigit = True
            num*=10
            num+=int(ch)
            continue
        else :
            if isdigit:
                stack.append(num)
                num = 0
            isdigit = False
            
            if ch == ')':
                while len(operators) > 0:
                    op = operators.pop()
                    if op == '(':
                        break
                    else:
                        stack.append(op)
                else:
                    raise ValueError
            elif ch == '(':
                operators.append(ch)
            else:
                while len(operators) > 0 and operators[-1]!='(' and prec(operators[-1]) >= prec(ch):
                    stack.append(operators.pop())
                operators.append(ch)
    if isdigit:
        stack.append(num)
    for op in operators[::-1]:
        if op not in "()":
            stack.append(op)
    return stack
        
def evaluate(stack):
    op = stack.pop()
    if type(op) is int:
        return op;
    else:
        b = evaluate(stack);
        a = evaluate(stack);
        return int(eval(str(a)+op+str(b)))

#@dup_file_stdin
def solve():
    for _ in range(int(sys.stdin.readline())):
        expr = sys.stdin.readline()[:-1].strip("=")
        print(evaluate(postFix(expr)))
        
solve()

Python: n = int(input())
for i in range(n):
    eq = input().replace("/","//").replace("=","")
    print(eval(eq))

C++: 
#if 1
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <array>
#include <deque>
#include <algorithm>
#include <utility>
#include <cstdint>
#include <functional>
#include <iomanip>
#include <numeric>
#include <assert.h>
#include <bitset>
#include <list>

auto& in = std::cin;
auto& out = std::cout;
#define all_range(C) std::begin(C), std::end(C)
const double PI = 3.141592653589793238462643383279502884197169399375105820974944;

std::string S;
size_t i = 0;
int32_t func()
{
	int32_t tmpv = 0;
	int32_t tmpmulv;
	if (S[i] == '(') {
		++i;
		tmpmulv = func();
		++i;
	}
	else {
		int32_t nowv = 0;
		while ('0' <= S[i] && S[i] <= '9') { nowv *= 10; nowv += S[i] - '0'; ++i; }
		tmpmulv = nowv;
	}
	while (S[i] != ')')
	{
		char ope = S[i];
		++i;
		int32_t nowv = 0;
		if (S[i] == '(') {
			++i;
			nowv = func();
		}
		else {
			while ('0' <= S[i] && S[i] <= '9') { nowv *= 10; nowv += S[i] - '0'; ++i; }
		}
		if (ope == '+') {
			tmpv += tmpmulv;
			tmpmulv = nowv;
		}
		else if (ope == '-') {
			tmpv += tmpmulv;
			tmpmulv = -nowv;
		}
		else if (ope == '*') {
			tmpmulv *= nowv;
		}
		else if (ope == '/') {
			tmpmulv /= nowv;
		}
	}
	++i;
	tmpv += tmpmulv;
	tmpmulv = 1;
	return tmpv;
}

int main()
{
	using std::endl;
	in.sync_with_stdio(false);
	out.sync_with_stdio(false);
	in.tie(nullptr);
	out.tie(nullptr);

	int32_t Q;
	in >> Q;
	while (Q--)
	{
		in >> S;
		S.pop_back();
		S.push_back(')');
		i = 0;
		out << func() << endl;
	}

	return 0;
}
#endif

C++: #include <iostream>
#include <string.h>
using namespace std;

double calc2(char *eq){
	long c=0, sign[100]={0};
	double num[100]={0};
	char *p = eq;
	while(*p){
		if('0'<=*p && *p<='9') num[c]=num[c]*10+*p-'0';
		else{
			if(*p=='+') sign[c]=1;
			else if(*p=='-') sign[c]=2;
			else if(*p=='*') sign[c]=3;
			else if(*p=='/') sign[c]=4;
			else if(*p=='=') break;
			else printf("err %c\n", *p);
			c++;
		}
		p++;
	}
	c++;
	for(int i=0;i<c-1;i++){
		if(sign[i]==3 || sign[i]==4){
			if(sign[i]==3)	num[i+1] = num[i] * num[i+1];
			if(sign[i]==4)	num[i+1] = num[i] / num[i+1];
			for(long j=i+1;j<c;j++){
				num[j-1] = num[j];
				sign[j-1] = sign[j];
			}
			i--;
			c--;
		}
	}
	for(int i=0;i<c-1;i++){
		if(sign[i]==1 || sign[i]==2){
			if(sign[i]==1)	num[i+1] = num[i] + num[i+1];
			if(sign[i]==2)	num[i+1] = num[i] - num[i+1];
			for(long j=i+1;j<c;j++){
				num[j-1] = num[j];
				sign[j-1] = sign[j];
			}
			i--;
			c--;
		}
	}
	return num[0];
}

long calc(char *eq){
	char *p, *p2, buf[120]={0}, cp[120]={0};
	long k,ret;
	strcpy(cp, eq);
	while((p=strchr(cp, '('))!=NULL){
		for(k=0,p2=p+1;;p2++)
			if(*p2=='(')k++;
			else if(*p2==')'){
				if(k)k--;
				else break;
			}
		memcpy(buf, p+1, p2-p-1);
		buf[p2-p-1]='=';
		buf[p2-p]=0;
		ret = calc(buf);
		*p=0;
		sprintf(buf, "%s%ld%s", cp, ret, p2+1);
		strcpy(cp,buf);
	}
	return (long)calc2(cp);
}

int main(){
	long i,j,n;
	char buf[120], p;
	for(cin >> n;n;n--){
		cin >> buf;
		cout << calc(buf) <<endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
const int INF=1145141919,MOD=1e9+7;
const long long LINF=8931145141919364364,LMOD=998244353;
inline long long mod(long long n,long long m){return(n%m+m)%m;}
// const int dx[]={1,0,-1,0,1,1,-1,-1},dy[]={0,-1,0,1,1,-1,-1,1};

template<class T>
struct Parser{
    typedef string::const_iterator itr;
    itr begin;
    T ans;
    Parser(const string &s){
        begin=s.begin();
        ans=expr(begin);
        // cerr<<s<<" "<<ans<<"\n";
    }
    T expr(itr &begin){
        T ret=term(begin);
        while(1){
            if((*begin)=='+'){
                consume(begin,'+');
                ret+=term(begin);
            }else if((*begin)=='-'){
                consume(begin,'-');
                ret-=term(begin);
            }else{
                return ret;
            }
        }
    }
    T numb(itr &begin){
        T ret=0;
        while('0'<=(*begin)&&(*begin)<='9'){
            ret*=10;
            ret+=(*begin)-'0';
            begin++;
        }
        return ret;
    }
    T fact(itr &begin){
        T ret=0;
        if((*begin)=='('){
            consume(begin,'(');
            ret=expr(begin);
            consume(begin,')');
        }else{
            ret=numb(begin);
        }
        return ret;
    }
    T term(itr &begin){
        T ret=fact(begin);
        while(1){
            if((*begin)=='*'){
                consume(begin,'*');
                ret*=fact(begin);
            }else if((*begin)=='/'){
                consume(begin,'/');
                ret/=fact(begin);
            }else{
                return ret;
            }
        }
    }
    void consume(itr &begin,char expected){
        if(*begin==expected){
            begin++;
        }else{
            fprintf(stderr,"Expected: '%c' Got: '%c'\n",expected,*begin);
            fprintf(stderr,"Rest string is ");
            while(*begin){
                fprintf(stderr,"%c",*begin++);
            }
        }
    }
};

int main(){
    int n; cin>>n;
    while(n--){
        string s; cin>>s;
        Parser<int> parse(s);
        cout<<parse.ans<<"\n";
    }
    return 0;
}