Python Program to count the number of Digits in a Number |



Python Program to count the number of Digits in a Number |


Program -



Python Program to Count the Number of Digits in a Number



Python Program to count the number of Digits in a Number |
Python program to count the number of Digits in a Number 






n=int(input("Enter number:"))
count=0
while(n>0):
    count=count+1
    n=n//10
print("The number of digits in the number are :",count)



Output



Enter number:123
The number of digits in the number are : 3


Post a Comment

Post a Comment (0)

Previous Post Next Post