Challenge: Count the Digits in a Number Using Recursion

Test your knowledge by solving a challenge in this lesson.

Problem statement

Your task is to write a recursive function count_digits. In the function parameter, you will pass the value of type int, and function will return an int value in the output.