Cody

Solution 205224

Submitted on 18 Feb 2013 by Zhemin
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))

b = 0 b = 2 temp = 0

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

b = 0 b = 4 temp = 102 b = 6 temp = 10 b = 6 temp = 1 b = 7 temp = 0

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

b = 0 b = 6 temp = 6553 b = 9 temp = 655 b = 14 temp = 65 b = 19 temp = 6 b = 25 temp = 0