Problem 1510. Number of digits in an integer
Solution Stats
Problem Comments
-
1 Comment
Add tests with 100,1000...
Solutions with ceil are wrong.
Solution Comments
-
1 Comment
function out = HowManyDigits(in)
out = floor(log10(in))+1;
end
Problem Recent Solvers379
Suggested Problems
-
Renaming a field in a structure array
1037 Solvers
-
176 Solvers
-
Try 1.5.4: Celsius to Fahrenheit
696 Solvers
-
07 - Common functions and indexing 2
353 Solvers
-
320 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!