Friday, July 31, 2015

Python Program to Add digits of a given number



number=input("Enter a number :)
sum=0

while number > 0 :
 rem=number % 10
 sum =sum + rem
 number=number /10

print sum