Clearly a bug in the test. This solution didn't pass the last two tests.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
a = 1;
b = 2;
out = sumDigits(a);
assert(isequal(out, b))
b =
2
|
2 | Fail |
%%
a = 10;
b = 7;
out = sumDigits(a);
assert(isequal(out, b))
Error: Assertion failed.
|
3 | Fail |
%%
a = 16;
b = 25;
out = sumDigits(a);
assert(isequal(out, b))
Error: Assertion failed.
|
280 Solvers
404 Solvers
Given a 4x4 matrix, swap the two middle columns
515 Solvers
505 Solvers
389 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!