Problem 1510. Number of digits in an integer
Solution Stats
Problem Comments
-
1 Comment
Jean-Marie Sainthillier
on 16 Sep 2014
Add tests with 100,1000...
Solutions with ceil are wrong.
Solution Comments
-
1 Comment
Soobok
on 4 Nov 2020
function out = HowManyDigits(in)
out = floor(log10(in))+1;
end
Problem Recent Solvers382
Suggested Problems
-
Select every other element of a vector
25351 Solvers
-
Number of 1s in the Binary Representation of a Number
386 Solvers
-
"Low : High - Low : High - Turn around " -- Create a subindices vector
415 Solvers
-
Element by element multiplication of two vectors
316 Solvers
-
375 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!