Cody

Solution 1879312

Submitted on 19 Jul 2019 by Maurice P
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))

y = '2' capture_vector = 2 d = 2 b = 2

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

y = '1024' capture_vector = 1 0 0 0 capture_vector = 1 0 0 0 capture_vector = 1 0 2 0 capture_vector = 1 0 2 4 d = 1 1 3 7 b = 7

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

y = '65536' capture_vector = 6 0 0 0 0 capture_vector = 6 5 0 0 0 capture_vector = 6 5 5 0 0 capture_vector = 6 5 5 3 0 capture_vector = 6 5 5 3 6 d = 6 11 16 19 25 b = 25