27 April 2017

Arithmetic Expression

My solution:
bool arithmeticExpression(int A, int B, int C) 
{
    return A + B == C || A - B == C || A * B == C || A / B == C && A % B == 0;
}

Previous Next