Cody

Problem 45412. Determina el número de cifras de un número

Solution 2507270

Submitted on 9 Jun 2020 by jmac
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 = 1000; y_correct = 4; assert(isequal(compute_number(x),y_correct))

2   Pass
x = 0; y_correct = 1; assert(isequal(compute_number(x),y_correct))

3   Pass
x = 7675483; y_correct = 7; assert(isequal(compute_number(x),y_correct))

4   Pass
x=-2 y_correct = 1; assert(isequal(compute_number(x),y_correct))

x = -2

5   Pass
x=8476352689256 y_correct = 13; assert(isequal(compute_number(x),y_correct))

x = 8.4764e+12

Suggested Problems

More from this Author4

Community Treasure Hunt

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

Start Hunting!