Medium
Count Digits with a Loop
Read a positive integer and count its digits using a while loop that divides by 10.
Input
One integer n ≥ 1.
Output
Digit count.
Sample 1
Input
12345
Output
5
Sample 2
Input
7
Output
1
Output appears hereOne integer n ≥ 1.
Digit count.
12345
5
7
1
Output appears here