- To print total number of digits in a number
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)
Enter Your number : 1132 Sum of total number of digits : 7Program
Coming Soon !
QuickThe dreams I chased took me on a journey, a journey more rewarding than the goals