Cody

Solution 1538735

Submitted on 24 May 2018 by Nicholas Radziul
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 f = 2 h = 2 h = 0.2000 a = 1 b = 2

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

b = 0 f = 1024 h = 1024 h = 102.4000 h = 10.2400 h = 1.0240 h = 0.1024 a = 4 ans = logical 1 c = 1 b = 1 f = 24 ans = logical 1 c = 0 b = 1 f = 24 ans = logical 1 c = 2 b = 3 f = 4 b = 7

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

b = 0 f = 65536 h = 65536 h = 6.5536e+03 h = 655.3600 h = 65.5360 h = 6.5536 h = 0.6554 a = 5 ans = logical 1 c = 6 b = 6 f = 5536 ans = logical 1 c = 5 b = 11 f = 536 ans = logical 1 c = 5 b = 16 f = 36 ans = logical 1 c = 3 b = 19 f = 6 b = 25

Suggested Problems

More from this Author95