#include <iostream>

using std::cout;
using std::endl;
using std::cin;

int main()
{
    int lhs , rhs , result = 0;
    char oper;

    cout << "Please enter an equation [a][sign][b] ex: ( 10 + 2 ):" << endl;
    cin >> lhs >> oper >> rhs;

    switch ( oper )
    {
        case '+':
            result = lhs + rhs;
            break;
        case '-': 
            result = lhs - rhs; 
            break;
        case '*': 
            result = lhs * rhs; 
            break;
        case '/': 
            if( rhs == 0 ) 
                cout << "Error: Can't divide by 0" << endl;
            else 
                result = lhs / rhs; 
            break;
        default: 
            cout << "Invalid operation" << endl;
    }

    cout << lhs << ' ' << oper << ' ' << rhs << " = " << result << endl;

    return ( 0 );
}