Saturday, March 2, 2019

Sum of Multi Digit Numbers - Python3

a=int(input('Enter the Number : '))
total=0

while a>0:
temp=a%10
total+=temp
a=a//10

print('Sum of numbers: ',total);

ScreenShot:

No comments:

Post a Comment