Count digits in a number
Count digits in a number
Write a function to count the number of digits in a given number.
Test Cases5 test cases
Test Cases:
Showing 2 of 3 sample test casesTest Case 1
Input:
{
"n": 12345
}Expected Output:
5
Test Case 2
Input:
{
"n": 0
}Expected Output:
1
+1 more sample test cases (will be validated when you run code)
Sign in to save your progress and mark problems as solved.
Code Editor
Loading editor...
Problem discussion
(0)Join the discussion — login to comment and help other developers.
Login to comment