Challenge: Count the Digits in a Number Using Recursion
Test your knowledge by solving a challenge in this lesson.
We'll cover the following
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.
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy