Cody

Solution 2185185

Submitted on 31 Mar 2020
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
a = 1; b = 2; out = sumDigits(a); assert(isequal(out, b))

value = 2 b = 0 b = 2 n = 0

2   Fail
a = 10; b = 7; out = sumDigits(a); assert(isequal(out, b))

value = 1024 b = 0 b = 4 n = 1 b = 8 n = 0

Assertion failed.

3   Fail
a = 16; b = 25; out = sumDigits(a); assert(isequal(out, b))

value = 65536 b = 0 b = 6 n = 1 b = 12 n = 0

Assertion failed.

Suggested Problems

More from this Author95