Cody

Solution 1160802

Submitted on 12 Apr 2017 by Jack Knoll
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
x = 1:7; y_correct = 0; assert(isequal(your_fcn_name(x),y_correct))

i = 2 j = 0 i = 3 i = 4 i = 5 i = 6 i = 7 i = 8 y = 0

2   Pass
x = [7 6 3]; y_correct = 1; assert(isequal(your_fcn_name(x),y_correct))

i = 2 j = 0 j = 1 i = 3 j = 2 i = 4 y = 1

3   Pass
x = [-1 6 3]; y_correct = 0; assert(isequal(your_fcn_name(x),y_correct))

i = 2 j = 0 i = 3 j = 1 i = 4 y = 1

4   Pass
x = 20:-2:-4; y_correct = 1; assert(isequal(your_fcn_name(x),y_correct))

i = 2 j = 0 j = 1 i = 3 j = 2 i = 4 j = 3 i = 5 j = 4 i = 6 j = 5 i = 7 j = 6 i = 8 j = 7 i = 9 j = 8 i = 10 j = 9 i = 11 j = 10 i = 12 j = 11 i = 13 j = 12 i = 14 y = 1

Suggested Problems

More from this Author100