Cody

# Problem 44287. sum all digits

Solution 1818725

Submitted on 17 May 2019
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   Fail
x = 1; y_correct = 1; assert(isequal(sum_all_digits(x),y_correct))

a = '1' y = 49

Assertion failed.

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

a = '112' y = 50

Assertion failed.

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

a = '18547' y = 55

Assertion failed.

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

a = '147852369' y = 57

Assertion failed.

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

a = '753159' y = 57

Assertion failed.

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

a = '1000245879653254' y = 52

Assertion failed.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!