Count digits - MATLAB Cody - MATLAB Central

Problem 45246. Count digits

Difficulty:Rate

Count total number of digits from 1 to n.

  • n=13
  • output=17

since from [1-9] total 9 digits.[10-13] total 4*2=8 digits.

Solution Stats

46.83% Correct | 53.17% Incorrect
Last Solution submitted on Aug 01, 2024

Problem Comments

Solution Comments

Show comments
Why should you share code?
In a discussion on LInkedin about my recent blog post, Do these...
3
6

Problem Recent Solvers29

Suggested Problems

More from this Author174

Problem Tags

Community Treasure Hunt

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

Start Hunting!