Cody

Solution 1566171

Submitted on 21 Jun 2018 by utkarsh singhvi
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))

x=1 y is 1

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

x=1 y is 2 x=3 y is 5 x=11 y is

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

x=1 y is 2 x=3 y is 5 x=11 y is

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

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

Suggested Problems

More from this Author95