Computer Science, asked by sampath1233, 11 months ago

write a program to input any integer and find the sum of its digits​


Anonymous: ___k off

Answers

Answered by urssh
0

def Sum_Of_Digits(Number):

Sum = 0

while(Number > 0):

Reminder = Number % 10

Sum = Sum + Reminder

Number = Number //10

return Sum

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

Sum = Sum_Of_Digits(Number)

print("\n Sum of the digits of Given Number = %d" %Sum)

Similar questions