Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
n = 15;
sm_correct = 60;
assert(isequal(sum3and5muls(n),sm_correct))
arr =
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
2 | Pass |
n = 18;
sm_correct = 78;
assert(isequal(sum3and5muls(n),sm_correct))
arr =
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
3 | Pass |
n = (2^2)-1;
sm_correct = 3;
assert(isequal(sum3and5muls(n),sm_correct))
arr =
1 2 3
|
4 | Pass |
n = randi(25);
sm_correct = sum(3:3:n)+sum(5:5:n)-sum(15:15:n);
assert(isequal(sum3and5muls(n),sm_correct))
arr =
1 2 3 4 5 6
|
54309 Solvers
Find the sum of the elements in the "second" diagonal
994 Solvers
Given a window, how many subsets of a vector sum positive
743 Solvers
07 - Common functions and indexing 3
317 Solvers
175 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!