Python Program:

- To print total number of digits in a number

Example:

User Input: 45

Output:
Sum of total number of digits : 9

num=int(input("Enter your number : "))
sum = 0
while num!=0 :
  sum+=num%10
  num=int(num/10)
print("Sum of total number of digits : ",sum)

Output:

  Enter Your number : 1132
  Sum of total number of digits : 7
Program
number

Main Logic :

while num!=0 :
  sum+=num%10    #Find single digits, & add them
  num=int(num/10)
Concept

Coming Soon !

Quick
Tutorial

Quote

Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning.