Cody

Solution 1604769

Submitted on 9 Aug 2018 by Srishti Saha
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
x = 1; y_correct = 1; assert(isequal(sum_all_digits(x),y_correct))

y = 0 D = 1 ans = 1

2   Pass
x = 112; y_correct = 4; assert(isequal(sum_all_digits(x),y_correct))

y = 2 D = 1 1 2 ans = 4

3   Pass
x = 18547; y_correct = 25; assert(isequal(sum_all_digits(x),y_correct))

y = 4 D = 1 8 5 4 7 ans = 25

4   Pass
x = 147852369; y_correct = 45; assert(isequal(sum_all_digits(x),y_correct))

y = 8 D = 1 4 7 8 5 2 3 6 9 ans = 45

5   Pass
x = 753159; y_correct = 30; assert(isequal(sum_all_digits(x),y_correct))

y = 5 D = 7 5 3 1 5 9 ans = 30

6   Pass
x = 1000245879653254; y_correct = 61; assert(isequal(sum_all_digits(x),y_correct))

y = 15 D = 1 0 0 0 2 4 5 8 7 9 6 5 3 2 5 4 ans = 61