Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sum_of_digit(a):
- res = 0
- while a:
- res += a % 10
- a = a // 10
- return res
- a = int(input())
- print(sum_of_digit(a))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement