Counting the occurrences of a digit in a book - MATLAB Cody - MATLAB Central

Problem 59736. Counting the occurrences of a digit in a book

Difficulty:Rate
The printer has printed a book with 'p' pages. How many times did they use the character 'd'? In other words, how many times does the digit 'd' appear when writing numbers from 1 to 'p'?

Solution Stats

51.52% Correct | 48.48% Incorrect
Last Solution submitted on Dec 26, 2024

Solution Comments

Show comments
R2025a Pre-release highlights
This topic is for discussing highlights to the current R2025a Pre-release.
14
5

Problem Recent Solvers16

Suggested Problems

More from this Author53

Problem Tags

Community Treasure Hunt

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

Start Hunting!
Go to top of page