Cody

Solution 1909359

Submitted on 22 Aug 2019 at 16:23
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; y_correct = 1; assert(isequal(vecsum(x),y_correct))

y = 1

2   Fail
x = [1 2 3 5]; y_correct = 11; assert(isequal(vecsum(x),y_correct))

y = 1 y = 2 y = 3 y = 5

Assertion failed.

3   Fail
x = [1 2 3 5]; y_correct = 11; assert(isequal(vecsum(x),y_correct))

y = 1 y = 2 y = 3 y = 5

Assertion failed.

4   Fail
x = 1:100; y_correct = 5050; assert(isequal(vecsum(x),y_correct))

y = 1 y = 2 y = 3 y = 4 y = 5 y = 6 y = 7 y = 8 y = 9 y = 10 y = 11 y = 12 y = 13 y = 14 y = 15 y = 16 y = 17 y = 18 y = 19 y = 20 y = 21 y = 22 y = 23 y = 24 y = 25 y = 26 y = 27 y = 28 y = 29 y = 30 y = 31 y = 32 y = 33 y = 34 y = 35 y = 36 y = 37 y = 38 y = 39 y = 40 y = 41 y = 42 y = 43 y = 44 y = 45 y = 46 y = 47 y = 48 y = 49 y = 50 y = 51 y = 52 y = 53 y = 54 y = 55 y = 56 y = 57 y = 58 y = 59 y = 60 y = 61 y = 62 y = 63 y = 64 y = 65 y = 66 y = 67 y = 68 y = 69 y = 70 y = 71 y = 72 y = 73 y = 74 y = 75 y = 76 y = 77 y = 78 y = 79 y = 80 y = 81 y = 82 y = 83 y = 84 y = 85 y = 86 y = 87 y = 88 y = 89 y = 90 y = 91 y = 92 y = 93 y = 94 y = 95 y = 96 y = 97 y = 98 y = 99 y = 100

Assertion failed.