Count Digits in Number Problem
Count Digits in Number Problem — ExecCode School DSA Practice
Solve the Count Digits in Number problem on ExecCode. Free online school DSA practice in Arrays - Basics. Write and run code in Java, C++, Python — no signup required to run.
Problem description
You are given a whole number. Your task is to find out how many separate number characters (digits) it has. For instance, the number '4567' has four digits. Print that number.
Examples
Input 12345; Output 5. Input 1; Output 1
Constraints
1 <= N <= 10^9
Practice Count Digits in Number free on ExecCode. Browse DSA problems, topic map, and placement guides.