Cody

Problem 2133. Reverse Calculator

Solution 2625316

Submitted on 28 Jun 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
numbers=[9 8]; operator='+'; value=1; assert(isequal(ReverseCalculator(numbers,operator),value))

Error: You may not use the command(s) eval in your code

2   Fail
numbers=[7 2]; operator='-'; value=-5; assert(isequal(ReverseCalculator(numbers,operator),value))

Error: You may not use the command(s) eval in your code

3   Fail
numbers=[0 6]; operator='/'; value=3; assert(isequal(ReverseCalculator(numbers,operator),value))

Error: You may not use the command(s) eval in your code

4   Fail
numbers=[1 5]; operator='*'; value=32; assert(isequal(ReverseCalculator(numbers,operator),value))

Error: You may not use the command(s) eval in your code