Cody

Solution 393790

Submitted on 30 Jan 2014 by sreedevi
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   Pass
%% numbers=[9 8]; operator='+'; value=1; assert(isequal(ReverseCalculator(numbers,operator),value))

a = 1 -1 0 0

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

a = 9.0000 -5.0000 14.0000 0.2857

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

a = 12 6 27 3

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

a = 12 4 32 2

Suggested Problems

More from this Author3