Cody

Solution 794802

Submitted on 16 Dec 2015 by Bruce
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))

a = 2 digit = 2 b = 2

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

a = 1024 digit = 4 digit = 2 digit = 0 digit = 1 b = 7

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

a = 65536 digit = 6 digit = 3 digit = 5 digit = 5 digit = 6 b = 25

Suggested Problems

More from this Author95