Python program to count number of digits of given number


Write a program in python to count number of digits of given number

---------------------------------------

n=int(input("Enter any Number : "))

count=0

while n>0:

   count+=1

   n=n//10

print("Number of Digit : ",count)

---------------------------------------

Output :-

Enter any Number : 56789

Number of Digit :  5

Post a Comment

0 Comments