Cody

Solution 1988573

Submitted on 24 Oct 2019
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
n = 15; sm_correct = 60; assert(isequal(sum3and5muls(n),sm_correct))

s = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 s1 = 3 6 9 12 15 s2 = 5 10 15

Output argument "sum_mult" (and maybe others) not assigned during call to "sum3and5muls". Error in Test1 (line 3) assert(isequal(sum3and5muls(n),sm_correct))

2   Fail
n = 18; sm_correct = 78; assert(isequal(sum3and5muls(n),sm_correct))

s = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 s1 = 3 6 9 12 15 18 s2 = 5 10 15

Output argument "sum_mult" (and maybe others) not assigned during call to "sum3and5muls". Error in Test2 (line 3) assert(isequal(sum3and5muls(n),sm_correct))

3   Fail
n = (2^2)-1; sm_correct = 3; assert(isequal(sum3and5muls(n),sm_correct))

s = 1 2 3 s1 = 3 s2 = 1×0 empty double row vector

Output argument "sum_mult" (and maybe others) not assigned during call to "sum3and5muls". Error in Test3 (line 3) assert(isequal(sum3and5muls(n),sm_correct))

4   Fail
n = randi(25); sm_correct = sum(3:3:n)+sum(5:5:n)-sum(15:15:n); assert(isequal(sum3and5muls(n),sm_correct))

s = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 s1 = 3 6 9 12 15 18 s2 = 5 10 15

Output argument "sum_mult" (and maybe others) not assigned during call to "sum3and5muls". Error in Test4 (line 3) assert(isequal(sum3and5muls(n),sm_correct))