Cody

Problem 2381. Sum of digit range

Solution 1692486

Submitted on 14 Dec 2018
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
n1 = 758; n2 = 469; y_correct = 2453; assert(isequal(digitrange(n1,n2),y_correct))

Undefined function 'range' for input arguments of type 'double'. Error in digitrange (line 2) sum(range(n1*n2)) Error in Test1 (line 3) assert(isequal(digitrange(n1,n2),y_correct))

2   Fail
n1 = 6.23e4; n2 = 12; y_correct = 124623; assert(isequal(digitrange(n1,n2),y_correct))

Undefined function 'range' for input arguments of type 'double'. Error in digitrange (line 2) sum(range(n1*n2)) Error in Test2 (line 3) assert(isequal(digitrange(n1,n2),y_correct))

Suggested Problems

More from this Author6

Community Treasure Hunt

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

Start Hunting!