Number of Circles in a Number - MATLAB Cody - MATLAB Central

Problem 322. Number of Circles in a Number

Difficulty:Rate

Given a number, return the number of closed 'circles' in the base 10 numerical representation.

Note: the number 4 has no circles

Example:

    8819 -> 5

Solution Stats

63.6% Correct | 36.4% Incorrect
Last Solution submitted on Jun 20, 2025

Problem Comments

Solution Comments

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

Problem Recent Solvers234

Suggested Problems

More from this Author56

Community Treasure Hunt

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

Start Hunting!